All Projects → flymzero → webdav_client

flymzero / webdav_client

Licence: BSD-3-Clause license
A dart WebDAV client library

Programming Languages

dart
5743 projects
HTML
75241 projects

Projects that are alternatives of or similar to webdav client

WebDavClient
Asynchronous cross-platform WebDAV client for .NET Core
Stars: ✭ 98 (+226.67%)
Mutual labels:  webdav, webdav-client
webdav-js
A simple WebDAV client written in JS for use as a bookmarklet, or integration into a web server.
Stars: ✭ 51 (+70%)
Mutual labels:  webdav, webdav-client
gitsynchista
Python tool for Pythonista to synchronize local files with a Github repository hosted on a WebDav server
Stars: ✭ 27 (-10%)
Mutual labels:  webdav, webdav-client
Filestash
🦄 A modern web client for SFTP, S3, FTP, WebDAV, Git, Minio, LDAP, CalDAV, CardDAV, Mysql, Backblaze, ...
Stars: ✭ 5,231 (+17336.67%)
Mutual labels:  webdav, webdav-client
Webdav Client Cpp
☁️ C++ WebDAV Client provides easy and convenient to work with WebDAV-servers.
Stars: ✭ 92 (+206.67%)
Mutual labels:  webdav
Gowebdav
A golang WebDAV client library and command line tool.
Stars: ✭ 97 (+223.33%)
Mutual labels:  webdav
Phpzoterowebdav
an implementation of a WebDAV server in php for use with zotero's sync functionality PLUS full access to zotero library and stored attachments (IMPORTANT: this original branch is no longer maintained; several patches have been applied in this fork: https://github.com/ddean4040/phpZoteroWebDAV)
Stars: ✭ 77 (+156.67%)
Mutual labels:  webdav
Webdav Fs
Node fs wrapper for WebDAV
Stars: ✭ 72 (+140%)
Mutual labels:  webdav
kodbox
kodbox is a file manager for web. It is a newly designed product based on kodexplorer. It is also a web code editor, which allows you to develop websites directly within the web browser.You can run kodbox either online or locally,on Linux, Windows or Mac based platforms
Stars: ✭ 1,188 (+3860%)
Mutual labels:  webdav
mindav
A self-hosted file backup server which bridges WebDAV protocol with @minio written in @totoval. Webdav ❤️ Minio
Stars: ✭ 64 (+113.33%)
Mutual labels:  webdav
Dcache
dCache - a system for storing and retrieving huge amounts of data, distributed among a large number of heterogenous server nodes, under a single virtual filesystem tree with a variety of standard access methods
Stars: ✭ 204 (+580%)
Mutual labels:  webdav
Unifile
Unified access to cloud storage services through a simple web API.
Stars: ✭ 105 (+250%)
Mutual labels:  webdav
WebDAVAjax
WebDAV AJAX Library for opening docs from a web page and saving back directly to server in a SharePoint-like manner.
Stars: ✭ 16 (-46.67%)
Mutual labels:  webdav
libcloudstorage
Official libcloudstorage repository.
Stars: ✭ 49 (+63.33%)
Mutual labels:  webdav
Vscode Remote Workspace
Multi protocol support for handling remote files like local ones in Visual Studio Code.
Stars: ✭ 197 (+556.67%)
Mutual labels:  webdav
Siyuan
📕 SiYuan is a local-first personal knowledge management system, support fine-grained block-level reference and Markdown instant-render editing.
Stars: ✭ 1,196 (+3886.67%)
Mutual labels:  webdav
backmeup
BackMeUp: An automated MySQL / MariaDB databases and files backup solution on *nix Machines using Amazon S3, WebDAV (ownCloud / NextCloud etc.), Google Drive and Dropbox.
Stars: ✭ 80 (+166.67%)
Mutual labels:  webdav
Floccus
☁️ Sync your bookmarks privately across browsers
Stars: ✭ 2,630 (+8666.67%)
Mutual labels:  webdav
Xandikos
A CalDAV/CardDAV server
Stars: ✭ 161 (+436.67%)
Mutual labels:  webdav
Sftpgo
Fully featured and highly configurable SFTP server with optional HTTP, FTP/S and WebDAV support - S3, Google Cloud Storage, Azure Blob
Stars: ✭ 3,534 (+11680%)
Mutual labels:  webdav

webdav_client

A dart WebDAV client library(support null-safety), use dio as http client.

pub.dev link

Main features


web support

see stackoverflow for CORSB problems needing attention

web

Usage

First of all you should create client instance using newClient() function:

var client = newClient(
    'http://localhost:6688/',
    user: 'flyzero',
    password: '123456',
    debug: true,
  );

Common settings

    // Set the public request headers
    client.setHeaders({'accept-charset': 'utf-8'});

    // Set the connection server timeout time in milliseconds.
    client.setConnectTimeout(8000);

    // Set send data timeout time in milliseconds.
    client.setSendTimeout(8000);

    // Set transfer data time in milliseconds.
    client.setReceiveTimeout(8000);

    // Test whether the service can connect
    try {
      await client.ping();
    } catch (e) {
      print('$e');
    }

Read all files in a folder

    var list = await client.readDir('/');
    list.forEach((f) {
        print('${f.name} ${f.path}');
      });

    // can sub folder
    var list2 = await client.readDir('/sub/sub/folder');
    list2.forEach((f) {
        print('${f.name} ${f.path}');
      });
    

Create folder

    await client.mkdir('/新建文件夹');

    // Recursively create folders
    await client.mkdirAll('/new folder/new folder2');

Remove a folder or file

If you remove the folder, some webdav services require a '/' at the end of the path.

    // Delete folder
    await client.remove('/new folder/new folder2/');

    // Delete file
    await client.remove('/new folder/新建文本文档.txt');

Rename a folder or file

If you rename the folder, some webdav services require a '/' at the end of the path.

    // Rename folder
    await client.rename('/新建文件夹/', '/新建文件夹2/', true);

    // Rename file
    await client.rename('/新建文件夹2/test.dart', '/新建文件夹2/test2.dart', true);

Copy a file / folder from A to B

If copied the folder (A > B), it will copy all the contents of folder A to folder B.

Some webdav services have been tested and found to delete the original contents of the B folder!!!

    // Copy all the contents of folderA to folder B
    await client.copy('/folder/folderA/', '/folder/folderB/', true);

    // Copy file
    await client.copy('/folder/aa.png', '/folder/bb.png', true);

Download file

    // download bytes
    await client.read('/folder/folder/openvpn.exe', onProgress: (c, t) {
        print(c / t);
      });

    // download 2 local file with stream 
    await client.read2File(
          '/folder/vpn.exe', 'C:/Users/xxx/vpn2.exe', onProgress: (c, t) {
        print(c / t);
      });

Upload file

    // upload local file 2 remote file with stream
    CancelToken c = CancelToken();
    await client.writeFromFile(
        'C:/Users/xxx/vpn.exe', '/f/vpn2.exe', onProgress: (c, t) {
        print(c / t);
      }, cancelToken: c);

Cancel request

    CancelToken cancel = CancelToken();

    // Supports most methods
    client.mkdir('/新建文件夹', cancel)
    .catchError((err) {
      prints(err.toString());
    });

    // in other
    cancel.cancel('reason')
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].