예제 #1
0
 public string ReadAllText() =>
 LocalFileProvider.Retry(() => System.IO.File.ReadAllText(_file.FullName));
예제 #2
0
 public Stream OpenRead() =>
 LocalFileProvider.Retry(() => _file.Open(FileMode.Open, FileAccess.Read, FileShare.ReadWrite));
예제 #3
0
 public void Delete() => LocalFileProvider.Retry(() => _file.Delete());
예제 #4
0
 public IEnumerable <IFile> GetFiles(SearchOption searchOption = SearchOption.TopDirectoryOnly) =>
 LocalFileProvider.Retry(() => _directory.GetFiles("*", searchOption).Select(file => new LocalFile(file.FullName)));
예제 #5
0
 public IEnumerable <IDirectory> GetDirectories(SearchOption searchOption = SearchOption.TopDirectoryOnly) =>
 LocalFileProvider.Retry(() => _directory.GetDirectories("*", searchOption).Select(directory => new LocalDirectory(directory.FullName)));
예제 #6
0
 public void Delete(bool recursive) => LocalFileProvider.Retry(() => _directory.Delete(recursive));
예제 #7
0
 public void Create() => LocalFileProvider.Retry(() => _directory.Create());