-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathIFilePicker.cs
More file actions
53 lines (52 loc) · 2.01 KB
/
IFilePicker.cs
File metadata and controls
53 lines (52 loc) · 2.01 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
50
51
52
53
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
#nullable enable
namespace MKFilePicker
{
public interface IFilePicker
{
/// <summary>
/// pick mutilple files
/// </summary>
/// <param name="pickOptions">can be null</param>
/// <returns></returns>
Task<IEnumerable<FilePickResult>> PickFilesAsync(FilePickOptions? pickOptions);
/// <summary>
/// pick single file
/// </summary>
/// <param name="pickOptions">can be null</param>
/// <returns></returns>
Task<FilePickResult?> PickFileAsync(FilePickOptions? pickOptions);
/// <summary>
/// pick a folder to create file in it
/// </summary>
/// <param name="pickOptions">set display title</param>
/// <returns></returns>
Task<FilePickResult?> PickFolderAsync(FilePickOptions? pickOptions);
/// <summary>
/// open picked file
/// </summary>
/// <param name="platformPath">the path from picked result</param>
/// <param name="fileOpenMode">"r","w","rw"</param>
/// <returns></returns>
Stream? OpenPickedFile(string platformPath,string fileOpenMode);
/// <summary>
/// create file
/// </summary>
/// <param name="platformFolderPath">the path from picked result or created from CreateFolder</param>
/// <param name="childPath">"etc,folder/file.txt or file.txt"</param>
/// <returns></returns>
FilePickResult? CreateFile(string platformFolderPath, string childPath);
/// <summary>
/// create folder
/// </summary>
/// <param name="platformFolderPath">the path from picked result or created from CreateFolder</param>
/// <param name="childPath">"etc,folder/file.txt or file.txt"</param>
/// <returns></returns>
FilePickResult? CreateFolder(string platformFolderPath, string childPath);
}
}