public string[] GetFiles(string folder) { string path = $@"{_directoryFile.GetCurrentDirectory()}\{folder}"; if (!_directoryFile.DirectoryExists(path)) { return(null); } return(_directoryFile.GetFiles(path)); }
public void WriteText(string path, string fileName, string contents, bool overrideFile = false) { if (!_directoryFile.IsValidFileName(fileName)) { return; } if (!_directoryFile.DirectoryExists(path)) { _directoryFile.CreateDirectory(path); } if (overrideFile) { _directoryFile.WriteAllText($@"{path}\{fileName}", contents); } else { _directoryFile.AppendAllText($@"{path}\{fileName}", contents); } }