using System.Collections.Generic; namespace WireMock.Handlers { /// /// Handler to interact with the file system to handle folders and read and write static mapping files. /// public interface IFileSystemHandler { /// /// Gets the folder where the static mappings are located. For local file system, this would be `{CurrentFolder}/__admin/mappings`. /// /// The foldername. string GetMappingFolder(); /// /// Determines whether the given path refers to an existing directory on disk. /// /// The path. /// true if path refers to an existing directory; false if the directory does not exist or an error occurs when trying to determine if the specified directory exists. bool FolderExists(string path); /// /// Creates all directories and subdirectories in the specified path unless they already exist. /// /// The path. void CreateFolder(string path); /// /// Returns an enumerable collection of file names in a specified path. /// /// The path. /// An enumerable collection of the full names (including paths) for the files in the directory specified by path. IEnumerable EnumerateFiles(string path); /// /// Read a static mapping file as text. /// /// The path (folder + filename with .json extension). string ReadMappingFile(string path); /// /// Write the static mapping. /// /// The path (folder + filename with .json extension). /// The text. void WriteMappingFile(string path, string text); } }