17 using System.Collections.Generic;
30 public virtual bool Exists(
string path)
32 return File.Exists(path);
38 public virtual void Delete(
string path)
48 File.WriteAllBytes(path, data);
56 return File.ReadAllBytes(path);
64 var fileInfo =
new FileInfo(path);
67 return fileInfo.Length;
77 return Directory.Exists(path);
85 return Directory.CreateDirectory(path);
91 public virtual IEnumerable<FileInfo>
EnumerateFiles(
string path,
string pattern, SearchOption searchOption, out
string rootfolder)
93 var directoryInfo =
new DirectoryInfo(path);
94 rootfolder = directoryInfo.FullName;
95 return directoryInfo.EnumerateFiles(pattern, searchOption);