public void DeleteOne(string fileName, bool isDir) { var sc = new SysCall(_options); if (!isDir) { if (!sc.RobustUnlink(fileName)) { Log.WriteLine("Can't delete '" + fileName + "' file"); } else { if (_options.Verbose > 0) { Log.WriteLine("deleting file " + fileName); } } } else { if (!sc.DoRmDir(fileName)) { Log.WriteLine("Can't delete '" + fileName + "' dir"); } else { if (_options.Verbose > 0) { Log.WriteLine("deleting directory " + fileName); } } } }
public void deleteOne(string fileName, bool isDir) { SysCall sc = new SysCall(options); if (!isDir) { if (!sc.robustUnlink(fileName)) { Log.WriteLine("Can't delete '" + fileName + "' file"); } else { if (options.verbose > 0) { Log.WriteLine("deleting file " + fileName); } } } else { if (!sc.doRmDir(fileName)) { Log.WriteLine("Can't delete '" + fileName + "' dir"); } else { if (options.verbose > 0) { Log.WriteLine("deleting directory " + fileName); } } } }