using System; using System.IO; namespace BestHTTP.PlatformSupport.FileSystem { /// /// These are the different modes that the plugin want's to use a filestream. /// public enum FileStreamModes { /// /// Create a new file. /// Create, /// /// Open an existing file for reading. /// OpenRead, /// /// Open or create a file for read and write. /// OpenReadWrite, /// /// Open an existing file for writing to the end. /// Append } public interface IIOService { /// /// Create a directory for the given path. /// void DirectoryCreate(string path); /// /// Return true if the directory exists for the given path. /// /// /// bool DirectoryExists(string path); /// /// Return with the file names for the given path. /// /// /// string[] GetFiles(string path); /// /// Delete the file for the given path. /// void FileDelete(string path); /// /// Return true if the file exists on the given path. /// bool FileExists(string path); /// /// Create a stream that can read and/or write a file on the given path. /// Stream CreateFileStream(string path, FileStreamModes mode); } }