blob: 32d19d778e85f046bb055adc4d2fc53ba999d8e6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.FileSystem;
using Tango.FSE.Common.FileSystem;
namespace Tango.FSE.Common.Firmware
{
public interface IFirmwareStorageProvider
{
/// <summary>
/// Gets a folder by the specified path.
/// </summary>
/// <param name="path">The path.</param>
/// <returns></returns>
Task<IFileSystemContainer> GetFolder(String path);
/// <summary>
/// Gets the ThisPC (the root path of the storage device).
/// </summary>
/// <returns></returns>
Task<IFileSystemContainer> GetRoot();
/// <summary>
/// Downloads the specified file item.
/// </summary>
/// <param name="item">The file item.</param>
/// <param name="localTargetPath">The local target path.</param>
/// <returns></returns>
Task<FileSystemHandler> Download(FileItem item, String localTargetPath);
/// <summary>
/// Uploads the specified local file or folder.
/// </summary>
/// <param name="localSourcePath">The local source path.</param>
/// <param name="remoteTargetPath">The remote destination path.</param>
/// <returns></returns>
/// <exception cref="System.IO.FileNotFoundException">Could not locate the local file or directory to upload.</exception>
Task<FileSystemHandler> Upload(String localSourcePath, String remoteTargetPath);
/// <summary>
/// Deletes the specified file or folder.
/// </summary>
/// <param name="item">The remote file or folder.</param>
/// <returns></returns>
Task Delete(FileSystemItem item);
/// <summary>
/// Creates a new folder at the specified remote parent.
/// </summary>
/// <param name="parent">The remote parent path.</param>
/// <param name="folderName">Name of the new folder.</param>
/// <returns></returns>
Task<FolderItem> CreateFolder(FileSystemItem parent, String folderName);
}
}
|