forked from TestableIO/System.IO.Abstractions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIMockFileDataAccessor.cs
59 lines (50 loc) · 1.81 KB
/
IMockFileDataAccessor.cs
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
59
using System.Collections.Generic;
namespace System.IO.Abstractions.TestingHelpers
{
/// <summary>
/// Provides access to the file system storage.
/// </summary>
public interface IMockFileDataAccessor
{
/// <summary>
/// Gets a file.
/// </summary>
/// <param name="path">The path of the file to get.</param>
/// <returns>The file. <see langword="null"/> if the file does not exist.</returns>
MockFileData GetFile(string path);
void AddFile(string path, MockFileData mockFile);
void AddDirectory(string path);
/// <summary>
/// Removes the file.
/// </summary>
/// <param name="path">The file to remove.</param>
/// <remarks>
/// The file must not exist.
/// </remarks>
void RemoveFile(string path);
/// <summary>
/// Determines whether the file exists.
/// </summary>
/// <param name="path">The file to check. </param>
/// <returns><see langword="true"/> if the file exists; otherwise, <see langword="false"/>.</returns>
bool FileExists(string path);
/// <summary>
/// Gets all unique paths of all files and directories.
/// </summary>
IEnumerable<string> AllPaths { get; }
/// <summary>
/// Gets the paths of all files.
/// </summary>
IEnumerable<string> AllFiles { get; }
/// <summary>
/// Gets the paths of all directories.
/// </summary>
IEnumerable<string> AllDirectories { get; }
DirectoryBase Directory { get; }
IFileInfoFactory FileInfo {get; }
PathBase Path { get; }
IDirectoryInfoFactory DirectoryInfo { get; }
IDriveInfoFactory DriveInfo { get; }
PathVerifier PathVerifier { get; }
}
}