wasDAVClient – Blame information for rev 8

Subversion Repositories:
Rev:
Rev Author Line No. Line
5 office 1 ///////////////////////////////////////////////////////////////////////////
2 // Copyright (C) Wizardry and Steamworks 2016 - License: GNU GPLv3 //
3 // Please see: http://www.gnu.org/licenses/gpl.html for legal details, //
4 // rights of fair usage, the disclaimer and warranty conditions. //
5 ///////////////////////////////////////////////////////////////////////////
6 // Originally based on: WebDAV .NET client by Sergey Kazantsev
7  
1 office 8 using System.Collections.Generic;
9 using System.IO;
10 using System.Threading.Tasks;
11 using wasDAVClient.Model;
12  
13 namespace wasDAVClient
14 {
15 public interface IClient
16 {
17 /// <summary>
3 office 18 /// Specify the WebDAV hostname (required).
1 office 19 /// </summary>
20 string Server { get; set; }
21  
22 /// <summary>
3 office 23 /// Specify the path of a WebDAV directory to use as 'root' (default: /)
1 office 24 /// </summary>
25 string BasePath { get; set; }
26  
27 /// <summary>
3 office 28 /// Specify an port (default: null = auto-detect)
1 office 29 /// </summary>
30 int? Port { get; set; }
31  
32 /// <summary>
3 office 33 /// Specify the UserAgent (and UserAgent version) string to use in requests
1 office 34 /// </summary>
35 string UserAgent { get; set; }
3 office 36  
1 office 37 /// <summary>
3 office 38 /// Specify the UserAgent (and UserAgent version) string to use in requests
1 office 39 /// </summary>
8 office 40 string UserAgentVersion { get; set; }
41  
1 office 42 /// <summary>
3 office 43 /// List all files present on the server.
1 office 44 /// </summary>
45 /// <param name="path">List only files in this path</param>
46 /// <param name="depth">Recursion depth</param>
47 /// <returns>A list of files (entries without a trailing slash) and directories (entries with a trailing slash)</returns>
8 office 48 Task<IEnumerable<Item>> List(string path = Constants.DIRECTORY_SEPARATOR, string depth = Constants.DavDepth.MEMBERS);
1 office 49  
50 /// <summary>
3 office 51 /// Get folder information from the server.
1 office 52 /// </summary>
53 /// <returns>A list of files (entries without a trailing slash) and directories (entries with a trailing slash)</returns>
8 office 54 Task<Item> GetFolder(string path = Constants.DIRECTORY_SEPARATOR);
1 office 55  
56 /// <summary>
3 office 57 /// Get file information from the server.
1 office 58 /// </summary>
59 /// <returns>A list of files (entries without a trailing slash) and directories (entries with a trailing slash)</returns>
8 office 60 Task<Item> GetFile(string path = Constants.DIRECTORY_SEPARATOR);
1 office 61  
62 /// <summary>
3 office 63 /// Download a file from the server
1 office 64 /// </summary>
65 /// <param name="remoteFilePath">Source path and filename of the file on the server</param>
66 Task<Stream> Download(string remoteFilePath);
67  
68 /// <summary>
3 office 69 /// Download a file from the server
1 office 70 /// </summary>
71 /// <param name="remoteFilePath">Source path and filename of the file on the server</param>
72 /// <param name="content"></param>
73 /// <param name="name"></param>
74 Task<bool> Upload(string remoteFilePath, Stream content, string name);
75  
76 /// <summary>
3 office 77 /// Create a directory on the server
1 office 78 /// </summary>
79 /// <param name="remotePath">Destination path of the directory on the server</param>
80 /// <param name="name"></param>
81 Task<bool> CreateDir(string remotePath, string name);
82  
83 /// <summary>
3 office 84 /// Get folder information from the server.
1 office 85 /// </summary>
86 /// <returns>A list of files (entries without a trailing slash) and directories (entries with a trailing slash)</returns>
8 office 87 Task DeleteFolder(string path = Constants.DIRECTORY_SEPARATOR);
1 office 88  
89 /// <summary>
3 office 90 /// Get file information from the server.
1 office 91 /// </summary>
92 /// <returns>A list of files (entries without a trailing slash) and directories (entries with a trailing slash)</returns>
8 office 93 Task DeleteFile(string path = Constants.DIRECTORY_SEPARATOR);
1 office 94  
95 /// <summary>
3 office 96 /// Move a folder on the server
1 office 97 /// </summary>
98 /// <param name="srcFolderPath">Source path of the folder on the server</param>
99 /// <param name="dstFolderPath">Destination path of the folder on the server</param>
100 Task<bool> MoveFolder(string srcFolderPath, string dstFolderPath);
101  
102 /// <summary>
3 office 103 /// Move a file on the server
1 office 104 /// </summary>
105 /// <param name="srcFilePath">Source path and filename of the file on the server</param>
106 /// <param name="dstFilePath">Destination path and filename of the file on the server</param>
107 Task<bool> MoveFile(string srcFilePath, string dstFilePath);
108 }
8 office 109 }