c3 / php-storage
Installs: 334
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/c3/php-storage
Requires
- league/flysystem-webdav: ^1.0
- myclabs/php-enum: ^1.5
- psr/log: ^1.0
This package is auto-updated.
Last update: 2025-10-08 09:12:18 UTC
README
Usage
Create storage object
$storage = StorageFactory::create( StorageTypeEnum::WEB_DAV(), 'https://webdav.example.com', [ 'prefix' => 'basePathToWebDAV/', 'userName' => 'user', 'password' => 'password', ] );
Stream remote file to local file system
$this->storage->download('remotePathInsideWebDAV/test.txt', 'localPath/test.txt');
Get remote file content
$content = $this->storage->downloadContent('remotePathInsideWebDAV/test.txt');
Sync remote folder structure to local filesystem (recursive)
$localFile = new \SplFileInfo('localPath/'); storage->syncRemoteToLocal('remotePathInsideWebDAVRoot/', $localFile,true);