public void DeleteFile(CmdParser parser) { var fullPath = parser.GetAttribute("name") ?? parser.GetAttribute(0); //var parent = parser.GetAttribute("parent") ?? parser.GetAttribute(1) ?? "/"; if (fullPath.Substring(0, 1).Equals(":")) { var id = fullPath.TrimStart(':').ToInt(); fileManager.DeleteFile(id); } else { fileManager.DeleteFile(fullPath); } }
public void DeleteMoviesFileTest() { _jsonFileManager.DeleteFile(directory, file, extension); Assert.IsFalse(_jsonFileManager.MovieFileExists(directory, file, extension)); }