PHPackages                             osw3/php-cloud-manager - 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. osw3/php-cloud-manager

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

osw3/php-cloud-manager
======================

Provides cloud connection and file manipulation tools.

0.0.7(1y ago)0292MITPHP

Since Jul 18Pushed 1y agoCompare

[ Source](https://github.com/OSW3/php-cloud-manager)[ Packagist](https://packagist.org/packages/osw3/php-cloud-manager)[ Docs](https://osw3.net)[ RSS](/packages/osw3-php-cloud-manager/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (8)Used By (2)

Cloud Manager
=============

[](#cloud-manager)

Provides cloud connection and file manipulation tools.

How to install
--------------

[](#how-to-install)

```
composer require osw3/php-cloud-manager
```

Supported services
------------------

[](#supported-services)

- [Dropbox](documentation/Dropbox.md)
- [FTP](documentation/FTP.md)

How to use
----------

[](#how-to-use)

### Create new connection

[](#create-new-connection)

#### Prepare the DSN

[](#prepare-the-dsn)

```
$dsn = "{$driver}://{$user}:{$pass}@{$host}";
```

#### Client instance

[](#client-instance)

```
use OSW3\CloudManager\Client;
$client = new Client($dsn);
```

##### Don't auto connect

[](#dont-auto-connect)

```
$client = new Client($dsn, false);
$client->connect();
```

### DSN Infos

[](#dsn-infos)

- `dsn(): DsnService`

    Bridge to DsnService.

    ```
    $client->dsn()->getDriver(); // ftp
    ```
- `getDriver(): ?string`

    ```
    $client->dsn()->getDriver(); // ftp
    ```
- `getHost(): ?string`

    ```
    $client->dsn()->getHost(); // site.com
    ```
- `getUser(): ?string`

    ```
    $client->dsn()->getUser(); // user
    ```
- `getPass(): ?string`

    ```
    $client->dsn()->getPass(); // pass
    ```
- `getAuth(): ?int`

    Get the Auth mode

    ```
    $client->dsn()->getAuth();
    ```
- `getToken(): ?int`

    ```
    $client->dsn()->getToken();
    ```
- `getPort(): ?int`

    ```
    $client->dsn()->getPort(); // 21
    ```
- `get(): ?string`

    Get the DSN string

    ```
    $client->dsn()->get(); // ftp://user:pass@site.com";
    ```

### Driver Statement

[](#driver-statement)

- `connect(): bool`

    Proceed to driver connection and return the connection state

    ```
    $client->connect();
    ```
- `disconnect(): bool`

    Proceed to disconnection and return the connection status

    ```
    $client->disconnect();
    ```
- `isConnected(): bool`

    return `true` when the driver is connected

    ```
    $client->isConnected();
    ```

### Temp directory

[](#temp-directory)

- `setTempDirectory(string $directory): static`

    Set the local server Temp directory for file manipulation.

    ```
    $client->setTempDirectory("my/temp/dir");
    ```
- `getTempDirectory(): string`

    Get the local server Temp directory for file manipulation.

    ```
    $client->getTempDirectory();
    ```

### Navigation

[](#navigation)

- `location(): string`

    Return the current location (like PWD)

    ```
    $client->location();
    ```
- `navigateTo(string $folder): bool`

    Set the pointer to a specific folder.

    ```
    $client->navigateTo("/www");
    ```
- `parent(): bool`

    Set the pointer to a parent folder.

    ```
    $client->parent();
    ```
- `root(): bool`

    Set the pointer to the root of the driver.

    ```
    $client->root();
    ```

### Entry infos

[](#entry-infos)

- `infos(?string $path=null, ?string $part=null): array|string`

    Retrieve the entry infos. Return an array if $part is null.

    ```
    $client->infos("/www/my-dir"); // [...]
    $client->infos("/www/my-dir", "type"); // folder
    ```
- `isFolder(string $path): bool`

    True if $path is a folder type.

    ```
    $client->isFolder("/www/my-dir");
    ```
- `isDirectory(string $path): bool`

    An alias of isFolder

    ```
    $client->isDirectory("/www/my-dir");
    ```
- `isFile(string $path): bool`

    True if $path is a file type.

    ```
    $client->isFile("/www/my-dir");
    ```
- `isLink(string $path): bool`

    True if $path is a link type.

    ```
    $client->isLink("/www/my-dir");
    ```
- `isBlock(string $path): bool`

    True if $path is a block type

    ```
    $client->isBlock("/www/my-dir");
    ```
- `isCharacter(string $path): bool`

    True if $path is a character type.

    ```
    $client->isCharacter("/www/my-dir");
    ```
- `isSocket(string $path): bool`

    True if $path is a socket type.

    ```
    $client->isSocket("/www/my-dir");
    ```
- `isPipe(string $path): bool`

    True if $path is a pipe type.

    ```
    $client->isPipe("/www/my-dir");
    ```

### Permissions

[](#permissions)

- `permissions(string $path, ?int $code=null): string|bool`

    Permissions getter and setter. Set permission to path if `$code` is not `null`. Get permission code if `$code` is `null`

    ```
    $client->permissions("/www/my-dir", 0777); // true
    $client->permissions("/www/my-dir"); // 0777
    ```
- `setPermission(string $path, int $code): bool`

    Set permissions code to a $path

    ```
    $client->setPermission("/www/my-dir", 0777);
    ```
- `getPermission(string $path): string`

    Read permissions code from a $path

    ```
    $client->getPermission("/www/my-dir"); // 0777
    ```

### Folder API

[](#folder-api)

- `browse(?string $directory=null): array`

    Return the content of a directory, like the Unix PWD command. Return the current pointer location content if the `$directory` parameter is `null`.

    ```
    $client->browse("/www/my-dir"); // [...]
    ```
- `createFolder(string $directory, int $permissions=0700, bool $navigateTo = true): bool`

    Create a directory and set the pointer into the new location id `$navigateTo` is `true`.

    ```
    $client->createFolder("/www/my-dir/my-sub-dir");
    ```
- `deleteFolder(?string $directory, bool $recursive=true): bool`

    Delete a directory and its contains.

    ```
    $client->deleteFolder("/www/my-dir/my-sub-dir");
    ```
- `duplicateFolder(string $source, string $destination): bool`

    Duplicate a directory on the Client

    ```
    $client->duplicateFolder("/www/my-dir", "/www/my-other-dirt");
    ```
- `copyFolder(string $source, string $destination): bool`

    Alias for `duplicateFolder`.
- `moveFolder(string $source, string $destination, bool $override=false): bool`

    Move a folder (cut + paste)

    ```
    $client->moveFolder("C://my-dir", "/www/my-dir");
    ```
- `uploadFolder(string $source, string $destination, bool $override=false): bool`

    Send a directory from your server to the remote Client

    ```
    $client->uploadFolder("C://my-dir", "/www/my-dir");
    ```
- `downloadFolder(string $source, string $destination, bool $override=false): bool`

    Get a directory from a Client to your server

    ```
    $client->downloadFolder("/www/my-dir", "C://my-dir");
    ```

### Files API

[](#files-api)

- `createFile(string $filename, string $content="", bool $binary=false): bool`

    Create a file from Stream to the Client.

    ```
    $client->createFile("/www/my-dir/my-file.txt", "Hi!\This is my file.");
    ```
- `deleteFile(?string $filename): bool`

    Delete a file from a Client.

    ```
    $client->deleteFile("/www/my-dir/my-file.txt");
    ```
- `duplicateFile(string $source, string $destination): bool`

    Duplicate a file on the Client

    ```
    $client->duplicateFile("/www/my-dir/my-file.txt", "/www/my-other-dir/my-file.txt");
    ```
- `copyFile(string $source, string $destination): bool`

    Alias for `duplicateFile`.
- `moveFile(string $source, string $destination, bool $override=false): bool`

    Move a file

    ```
    $client->moveFile("C://my-dir/my-file.txt", "/www/my-dir/my-file.txt");
    ```
- `uploadFile(string $source, string $destination, bool $override=false): bool`

    Send a file from your server to the remote Client

    ```
    $client->uploadFile("C://my-dir/my-file.txt", "/www/my-dir/my-file.txt");
    ```
- `downloadFile(string $source, string $destination, bool $override=false): bool`

    Get a file from a Client to your server

    ```
    $client->downloadFile("/www/my-dir/my-file.txt", "C://my-dir/my-file.txt");
    ```

### Folder &amp; Files API (Hybrid aliases of previous API)

[](#folder--files-api-hybrid-aliases-of-previous-api)

- `delete(?string $path, bool $recursive=true): bool`;

    Delete a directory or a file

    ```
    $client->delete("/www/my-dir/my-file.txt");
    $client->delete("/www/my-dir");
    ```
- `duplicate(string $source, string $destination): bool`;

    Duplicate a directory or a file

    ```
    $client->duplicate("/www/my-dir/my-file.txt", "/www/my-sub-dir/my-file.txt");
    $client->duplicate("/www/my-dir", "/www/my-sub-dir");
    ```
- `copy(string $source, string $destination): bool`;

    Alias of `duplicate`
- `move(string $source, string $destination): bool`;

    Duplicate a directory or a file and delete the `$source`.

    ```
    $client->move("/www/my-dir/my-file.txt", "/www/my-sub-dir/my-file.txt");
    $client->move("/www/my-dir", "/www/my-sub-dir");
    ```
- `rename(string $source, string $destination): bool`;

    Alias of `move`
- `upload(string $source, string $destination, bool $override=false): bool`;

    Send a directory or a file from your server to the Client

    ```
    $client->upload("C://my-dir", "/www/my-dir");
    $client->upload("C://my-dir/my-file.txt", "/www/my-dir/my-file.txt");
    ```
- `download(string $source, string $destination, bool $override=false): bool`;

    Get a directory or a file from the Client to your server

    ```
    $client->download("/www/my-dir", "C://my-dir");
    $client->download("/www/my-dir/my-file.txt", "C://my-dir/my-file.txt");
    ```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance45

Moderate activity, may be stable

Popularity7

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 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 ~40 days

Recently: every ~60 days

Total

7

Last Release

425d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2088750?v=4)[OSW3](/maintainers/osw3)[@OSW3](https://github.com/OSW3)

---

Top Contributors

[![ArnaudBDL](https://avatars.githubusercontent.com/u/53226044?v=4)](https://github.com/ArnaudBDL "ArnaudBDL (10 commits)")

### Embed Badge

![Health badge](/badges/osw3-php-cloud-manager/health.svg)

```
[![Health](https://phpackages.com/badges/osw3-php-cloud-manager/health.svg)](https://phpackages.com/packages/osw3-php-cloud-manager)
```

###  Alternatives

[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[google/cloud-storage

Cloud Storage Client for PHP

34390.8M125](/packages/google-cloud-storage)[illuminate/filesystem

The Illuminate Filesystem package.

15261.6M2.6k](/packages/illuminate-filesystem)[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M62](/packages/creocoder-yii2-flysystem)[flowjs/flow-php-server

PHP library for handling chunk uploads. Works with flow.js html5 file uploads.

2451.6M15](/packages/flowjs-flow-php-server)

PHPackages © 2026

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