Skip to content

clubdrei/php-storage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP Storage

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);

Credits

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages