wasDAVClient – Blame information for rev 3
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | using System.Collections.Generic; |
2 | using System.IO; |
||
3 | using System.Threading.Tasks; |
||
4 | using wasDAVClient.Model; |
||
5 | |||
6 | namespace wasDAVClient |
||
7 | { |
||
8 | public interface IClient |
||
9 | { |
||
10 | /// <summary> |
||
3 | office | 11 | /// Specify the WebDAV hostname (required). |
1 | office | 12 | /// </summary> |
13 | string Server { get; set; } |
||
14 | |||
15 | /// <summary> |
||
3 | office | 16 | /// Specify the path of a WebDAV directory to use as 'root' (default: /) |
1 | office | 17 | /// </summary> |
18 | string BasePath { get; set; } |
||
19 | |||
20 | /// <summary> |
||
3 | office | 21 | /// Specify an port (default: null = auto-detect) |
1 | office | 22 | /// </summary> |
23 | int? Port { get; set; } |
||
24 | |||
25 | /// <summary> |
||
3 | office | 26 | /// Specify the UserAgent (and UserAgent version) string to use in requests |
1 | office | 27 | /// </summary> |
28 | string UserAgent { get; set; } |
||
3 | office | 29 | |
1 | office | 30 | /// <summary> |
3 | office | 31 | /// Specify the UserAgent (and UserAgent version) string to use in requests |
1 | office | 32 | /// </summary> |
33 | string UserAgentVersion { get; set; } |
||
34 | |||
35 | |||
36 | /// <summary> |
||
3 | office | 37 | /// List all files present on the server. |
1 | office | 38 | /// </summary> |
39 | /// <param name="path">List only files in this path</param> |
||
40 | /// <param name="depth">Recursion depth</param> |
||
41 | /// <returns>A list of files (entries without a trailing slash) and directories (entries with a trailing slash)</returns> |
||
42 | Task<IEnumerable<Item>> List(string path = "/", int? depth = 1); |
||
43 | |||
44 | /// <summary> |
||
3 | office | 45 | /// Get folder information from the server. |
1 | office | 46 | /// </summary> |
47 | /// <returns>A list of files (entries without a trailing slash) and directories (entries with a trailing slash)</returns> |
||
48 | Task<Item> GetFolder(string path = "/"); |
||
49 | |||
50 | /// <summary> |
||
3 | office | 51 | /// Get file 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> |
||
54 | Task<Item> GetFile(string path = "/"); |
||
55 | |||
56 | /// <summary> |
||
3 | office | 57 | /// Download a file from the server |
1 | office | 58 | /// </summary> |
59 | /// <param name="remoteFilePath">Source path and filename of the file on the server</param> |
||
60 | Task<Stream> Download(string remoteFilePath); |
||
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 | /// <param name="content"></param> |
||
67 | /// <param name="name"></param> |
||
68 | Task<bool> Upload(string remoteFilePath, Stream content, string name); |
||
69 | |||
70 | /// <summary> |
||
3 | office | 71 | /// Create a directory on the server |
1 | office | 72 | /// </summary> |
73 | /// <param name="remotePath">Destination path of the directory on the server</param> |
||
74 | /// <param name="name"></param> |
||
75 | Task<bool> CreateDir(string remotePath, string name); |
||
76 | |||
77 | /// <summary> |
||
3 | office | 78 | /// Get folder information from the server. |
1 | office | 79 | /// </summary> |
80 | /// <returns>A list of files (entries without a trailing slash) and directories (entries with a trailing slash)</returns> |
||
81 | Task DeleteFolder(string path = "/"); |
||
82 | |||
83 | /// <summary> |
||
3 | office | 84 | /// Get file 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> |
||
87 | Task DeleteFile(string path = "/"); |
||
88 | |||
89 | /// <summary> |
||
3 | office | 90 | /// Move a folder on the server |
1 | office | 91 | /// </summary> |
92 | /// <param name="srcFolderPath">Source path of the folder on the server</param> |
||
93 | /// <param name="dstFolderPath">Destination path of the folder on the server</param> |
||
94 | Task<bool> MoveFolder(string srcFolderPath, string dstFolderPath); |
||
95 | |||
96 | /// <summary> |
||
3 | office | 97 | /// Move a file on the server |
1 | office | 98 | /// </summary> |
99 | /// <param name="srcFilePath">Source path and filename of the file on the server</param> |
||
100 | /// <param name="dstFilePath">Destination path and filename of the file on the server</param> |
||
101 | Task<bool> MoveFile(string srcFilePath, string dstFilePath); |
||
102 | } |
||
103 | } |