Giter Club home page Giter Club logo

cloudwebdavlib's Introduction

CloudWebdavLib

a .NET WebDAV Client Library for Cloud Providers

Features:

  • Assemblies for .NET 4.5.2
  • Just one external reference (Newtonsoft.Json)
  • Easy installation using NuGet
  • Upload/Download tracking support
  • Proxy Support
  • Upload/Download cancellation support

List of functions:

  • Quota
  • Copy
  • Move
  • Delete
  • List
  • Rename
  • CreateNewFolder
  • Exists
  • Upload
  • DownloadFile
  • DownloadFileAsStream
  • DownloadFileAsString

Supported Cloud Storage Providers

  • 4Shared.com
  • AllSync.com
  • Box.com
  • CloudMe.com
  • DriveOnWeb.de
  • Files.fm
  • HiDrive.com
  • Koofr.net
  • MagentaCLOUD.de
  • MyDrive.ch
  • oCloud.de
  • OpenDrive.com
  • OwnDrive.com
  • pCloud.com
  • PicturePush.com
  • PowerFolder.com
  • SmartFile.com
  • StorageMadeEasy.com
  • SwissDisk.com
  • TeraCloud.jp
  • Woelkli.com
  • Zaclys.com
  • LetsUpload.co
  • MailBox.org

Code simple:

Dim root As New CloudWebdavLib.JSON.Node
Dim client As CloudWebdavLib.IClient = New CloudWebdavLib.WClient(CloudWebdavLib.CloudDav.ProvidersNameEnum.pCloud, "user", "pass", root, Nothing)

''OR with proxy
''set proxy and connection options
Dim conn As New CloudWebdavLib.ConnectionSettings With {.CloseConnection = True, .TimeOut = TimeSpan.FromMinutes(30), .Proxy = New CloudWebdavLib.ProxyConfig With {.SetProxy = True, .ProxyIP = "127.0.0.1", .ProxyPort = 8888, .ProxyUsername = "user", .ProxyPassword = "pass"}}
Dim client2 As CloudWebdavLib.IClient = New CloudWebdavLib.WClient(CloudWebdavLib.CloudDav.ProvidersNameEnum.pCloud, "user", "pass", root, conn)

''get storage usage if available
Await client.Quota

''list files/folders in root node
Await client.List(root, 1)

''create TEMP nodes to use it in the examples
Dim fileNode As New CloudWebdavLib.JSON.Node
Dim folderNode As New CloudWebdavLib.JSON.Node

Await client.Copy(fileNode, folderNode)
Await client.Move(fileNode, folderNode, Nothing, False)
Await client.Rename(fileNode, "new_name.rar")
Await client.CreateNewFolder(folderNode, "folder name")
Await client.Delete(fileNode)
Await client.Exists(folderNode.ShortPath)

Dim cts As New Threading.CancellationTokenSource()
Dim _ReportCls As New Progress(Of CloudWebdavLib.ReportStatus)(Sub(ReportClass As CloudWebdavLib.ReportStatus) Console.WriteLine(String.Format("{0} - {1}% - {2}", String.Format("{0}/{1}", (ReportClass.BytesTransferred), (ReportClass.TotalBytes)), CInt(ReportClass.ProgressPercentage), ReportClass.TextStatus)))

Await client.Upload("c:\\VIDO.mp4", CloudWebdavLib.utilities.UploadTypes.FilePath, folderNode, "VIDO.mp4", _ReportCls, cts.Token)
Await client.DownloadFile(fileNode, "c:\\downloads\VIDO.mp4", _ReportCls, cts.Token)
Await client.DownloadFileAsStream(fileNode, _ReportCls, cts.Token)
Await client.DownloadFileAsString(fileNode, _ReportCls, cts.Token)

cloudwebdavlib's People

Contributors

jackkoolage avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.