contelli / webdav-sync
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/contelli/webdav-sync
Requires
- php: >=8.2
README
A simple library to connect to Nextcloud based webdav ressources
Dependencies
- cURL
- PHP-8.2 or above
- PHP extensions: DOMDocument
Installation
composer require contelli/webdav-sync
composer update
Usage
require_once 'src/WebDav/WebDavClient.php';
use WebDav\WebDav\WebDavClient;
$web_dav_client = new WebDavClient( '', '', '>' );
$web_dav_client->upload_file(dirname(FILE) . '/FILENAME_TO_UPLOAD', '/DIRECTORY_ON_WEBDAV');
$contents = $web_dav_client->read_contents('/DIRECTORY TO READ')); $web_dav_client->delete(REMOTE_FILE_TO_DELETE); $web_dav_client->downloa(REMOTE_FILE_TO_DOWNLOAD, LOCAL_DESTINATION_TO_SAVE);