PHPackages                             meisam-mulla/sfs-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. meisam-mulla/sfs-client

ActiveLibrary[File &amp; Storage](/categories/file-storage)

meisam-mulla/sfs-client
=======================

A client for interacting with a StretchFS to manage content and jobs.

v1.5(2y ago)21011MITPHPPHP ^8.0

Since Apr 5Pushed 2y ago2 watchersCompare

[ Source](https://github.com/MeisamMulla/sfs-client)[ Packagist](https://packagist.org/packages/meisam-mulla/sfs-client)[ RSS](/packages/meisam-mulla-sfs-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (1)Versions (7)Used By (1)

SFS Client
==========

[](#sfs-client)

The SFS Client is a PHP library for communicating with a StretchFS server to manage content and jobs. It leverages GuzzleHttp for HTTP requests, providing a simple interface for file uploads, downloads, and job management.

[StretchFS](https://github.com/nullivex/stretchfs-sdk)

Installation
------------

[](#installation)

Install the package via Composer:

```
composer require meisam-mulla/sfs-client
```

Usage
-----

[](#usage)

First, include the SFS Client in your project:

```
use MeisamMulla\SfsClient\StretchFS;
```

Initialize the client with your server's configuration:

```
$client = new StretchFS([
    'username' => 'your_username', // optional if you have a token
    'password' => 'your_password', // optional if you have a token
    'domain' => 'sfsserver.net', // SFS server
    'port' => 8161, // Default port
    'token' => 'your_token', // If you already have a token
]);
```

Authentication
--------------

[](#authentication)

Generate a new token:

```
$token = $client->generateToken();
```

Destroy a token:

```
$client->destroyToken(token: 'iu23gn43g2i4i');
```

Folder Management
-----------------

[](#folder-management)

Create a folder:

```
$client->folderCreate(folderPath: '/test');
```

Delete a folder:

```
$client->folderDelete(folderPath: '/test');
```

List all files in a directory:

```
$client->fileList(folderPath: '/');
```

File Management
---------------

[](#file-management)

Upload a file from path

```
$client->fileUpload(filePath: '/home/user/somefile.txt', folderPath: '/');
```

Upload a file from string

```
$client->fileUploadFromString(filePath: '/text.txt', contents: 'contents of text.txt');
```

Download a file

```
$contents = $client->fileDownload(filePath: '/text.txt');
```

Stream a file

```
$stream = $client->fileDownloadStream(filePath: '/text.txt');
```

Get file details

```
$contents = $client->fileDetail(filePath: '/text.txt');
```

Delete a file

```
$client->fileDelete(filePath: '/text.txt');
```

Temporary URLs
--------------

[](#temporary-urls)

Generate url for temporary download

```
$response = $client->fileDownloadUrl(filePath: '/text.txt', seconds: 3600);
```

Job Management
--------------

[](#job-management)

Create a job

```
$job = $client->jobCreate(description: [
    "callback" => [
        'request' => [
            'method' => 'GET',
            'url' => "http://some.url/job.complete",
        ],
    ],
    "resource" => [
        [
            "name" => 'somefile.zip',
            "request" => [
                "method" => "GET",
                "url" => "https://url.to/file.zip",
            ]
        ]
    ]
], priority: 12, category: 'ingest');
```

Update a job

```
$client->jobUpdate(handle: '5sE4674U4ft2', changes: [
    "resource" => [
        [
            "name" => 'somefile.zip',
            "request" => [
                "method" => "GET",
                "url" => "https://url.to/file.zip",
            ]
        ]
    ]
]);
```

Start a job

```
$client->jobStart(handle: 'FQukh4sIMN4F');
```

Get job details

```
$client->jobDetail(handle: 'FQukh4sIMN4F');
```

Abort a job

```
$client->jobAbort(handle: 'FQukh4sIMN4F');
```

Retry a job

```
$client->jobRetry(handle: 'FQukh4sIMN4F');
```

Delete a job

```
$client->jobRemove(handle: 'FQukh4sIMN4F');
```

Check if content exists in a job temporary directory

```
$client->jobContentExists(handle: 'FQukh4sIMN4F', file: 'file.zip');
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

6

Last Release

761d ago

PHP version history (2 changes)v1.0PHP ^7.4|^8.0

v1.2PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/cbc74747d67ea401016b4308dabc2eb0069f03dbd9e11e2f57e7db4781109928?d=identicon)[meisam-mulla](/maintainers/meisam-mulla)

---

Top Contributors

[![MeisamMulla](https://avatars.githubusercontent.com/u/1777638?v=4)](https://github.com/MeisamMulla "MeisamMulla (19 commits)")

### Embed Badge

![Health badge](/badges/meisam-mulla-sfs-client/health.svg)

```
[![Health](https://phpackages.com/badges/meisam-mulla-sfs-client/health.svg)](https://phpackages.com/packages/meisam-mulla-sfs-client)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k511.3M2.2k](/packages/aws-aws-sdk-php)[google/cloud

Google Cloud Client Library

1.2k16.2M54](/packages/google-cloud)[stechstudio/laravel-zipstream

A fast and simple streaming zip file downloader for Laravel.

4633.7M3](/packages/stechstudio-laravel-zipstream)[fof/upload

The file upload extension for the Flarum forum with insane intelligence.

188171.7k15](/packages/fof-upload)[uploadcare/uploadcare-php

Uploadcare PHP integration handles uploads and further operations with files by wrapping Upload and REST APIs.

1022.5M6](/packages/uploadcare-uploadcare-php)[azure-oss/storage

Azure Blob Storage PHP SDK

37985.0k5](/packages/azure-oss-storage)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
