-
Notifications
You must be signed in to change notification settings - Fork 92
Expand file tree
/
Copy pathIFileSystem.cs
More file actions
49 lines (44 loc) · 2.17 KB
/
IFileSystem.cs
File metadata and controls
49 lines (44 loc) · 2.17 KB
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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace PCLStorage
{
/// <summary>
/// Represents a file system.
/// </summary>
public interface IFileSystem
{
/// <summary>
/// A folder representing storage which is local to the current device
/// </summary>
IFolder LocalStorage { get; }
/// <summary>
/// A folder representing storage which may be synced with other devices for the same user
/// </summary>
IFolder RoamingStorage { get; }
/// <summary>
/// Gets a file, given its path. Returns null if the file does not exist.
/// </summary>
/// <param name="path">The path to a file, as returned from the <see cref="IFile.Path"/> property.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>A file for the given path, or null if it does not exist.</returns>
Task<IFile> GetFileFromPathAsync(string path, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Gets a folder, given its path. Returns null if the folder does not exist.
/// </summary>
/// <param name="path">The path to a folder, as returned from the <see cref="IFolder.Path"/> property.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>A folder for the specified path, or null if it does not exist.</returns>
Task<IFolder> GetFolderFromPathAsync(string path, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Gets a file from the App Bundle. Returns null if the file does not exist.
/// </summary>
/// <param name="path">The path to a file, as returned from the <see cref="IFile.Path"/> property.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>A file for the given path, or null if it does not exist.</returns>
Task<IFile> GetFileFromAppBundleAsync(string path, CancellationToken cancellationToken);
}
}