/
IFileInfo.cs
58 lines (57 loc) · 2.66 KB
/
IFileInfo.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
using System.Security.AccessControl;
namespace System.IO.Abstractions
{
public interface IFileInfo : IFileSystemInfo
{
/// <inheritdoc cref="FileInfo.AppendText"/>
StreamWriter AppendText();
/// <inheritdoc cref="FileInfo.CopyTo(string)"/>
IFileInfo CopyTo(string destFileName);
/// <inheritdoc cref="FileInfo.CopyTo(string,bool)"/>
IFileInfo CopyTo(string destFileName, bool overwrite);
/// <inheritdoc cref="FileInfo.Create"/>
Stream Create();
/// <inheritdoc cref="FileInfo.CreateText"/>
StreamWriter CreateText();
/// <inheritdoc cref="FileInfo.Decrypt"/>
void Decrypt();
/// <inheritdoc cref="FileInfo.Encrypt"/>
void Encrypt();
/// <inheritdoc cref="FileInfo.GetAccessControl()"/>
FileSecurity GetAccessControl();
/// <inheritdoc cref="FileInfo.GetAccessControl(AccessControlSections)"/>
FileSecurity GetAccessControl(AccessControlSections includeSections);
/// <inheritdoc cref="FileInfo.MoveTo(string)"/>
void MoveTo(string destFileName);
#if FEATURE_FILE_MOVE_WITH_OVERWRITE
/// <inheritdoc cref="FileInfo.MoveTo(string,bool)"/>
void MoveTo(string destFileName, bool overwrite);
#endif
/// <inheritdoc cref="FileInfo.Open(FileMode)"/>
Stream Open(FileMode mode);
/// <inheritdoc cref="FileInfo.Open(FileMode,FileAccess)"/>
Stream Open(FileMode mode, FileAccess access);
/// <inheritdoc cref="FileInfo.Open(FileMode,FileAccess,FileShare)"/>
Stream Open(FileMode mode, FileAccess access, FileShare share);
/// <inheritdoc cref="FileInfo.OpenRead"/>
Stream OpenRead();
/// <inheritdoc cref="FileInfo.OpenText"/>
StreamReader OpenText();
/// <inheritdoc cref="FileInfo.OpenWrite"/>
Stream OpenWrite();
/// <inheritdoc cref="FileInfo.Replace(string,string)"/>
IFileInfo Replace(string destinationFileName, string destinationBackupFileName);
/// <inheritdoc cref="FileInfo.Replace(string,string,bool)"/>
IFileInfo Replace(string destinationFileName, string destinationBackupFileName, bool ignoreMetadataErrors);
/// <inheritdoc cref="FileInfo.SetAccessControl(FileSecurity)"/>
void SetAccessControl(FileSecurity fileSecurity);
/// <inheritdoc cref="FileInfo.Directory"/>
IDirectoryInfo Directory { get; }
/// <inheritdoc cref="FileInfo.DirectoryName"/>
string DirectoryName { get; }
/// <inheritdoc cref="FileInfo.IsReadOnly"/>
bool IsReadOnly { get; set; }
/// <inheritdoc cref="FileInfo.Length"/>
long Length { get; }
}
}