forked from microsoft/MSBuildSdks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
IFileSystem.cs
30 lines (20 loc) · 1.09 KB
/
IFileSystem.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
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// Licensed under the MIT license.
using System.Collections.Generic;
using System.IO;
namespace Microsoft.Build.Artifacts
{
internal interface IFileSystem
{
FileInfo CopyFile(FileInfo source, string destination, bool overwrite);
DirectoryInfo CreateDirectory(string path);
bool DirectoryExists(string path);
IEnumerable<string> EnumerateDirectories(string path, string searchPattern = "*", SearchOption searchOption = SearchOption.TopDirectoryOnly);
IEnumerable<DirectoryInfo> EnumerateDirectories(DirectoryInfo path, string searchPattern = "*", SearchOption searchOption = SearchOption.TopDirectoryOnly);
IEnumerable<string> EnumerateFiles(string path, string searchPattern = "*", SearchOption searchOption = SearchOption.TopDirectoryOnly);
IEnumerable<FileInfo> EnumerateFiles(DirectoryInfo path, string searchPattern = "*", SearchOption searchOption = SearchOption.TopDirectoryOnly);
bool FileExists(string path);
bool FileExists(FileInfo file);
}
}