public void DeleteFiles(List <FileStruct> fileList) { string[] argv = new string[1]; List <FileStruct> localFileList = null; if (options.cvsExclude) { Exclude.AddCvsExcludes(); } for (int j = 0; j < fileList.Count; j++) { if ((fileList[j].mode & Options.FLAG_TOP_DIR) == 0 || !Util.S_ISDIR(fileList[j].mode)) { continue; } argv[0] = options.dir + fileList[j].GetFullName(); FileList fList = new FileList(options); if ((localFileList = fList.sendFileList(null, argv)) == null) { continue; } for (int i = localFileList.Count - 1; i >= 0; i--) { if (localFileList[i].baseName == null) { continue; } localFileList[i].dirName = localFileList[i].dirName.Substring(options.dir.Length); if (FileList.fileListFind(fileList, (localFileList[i])) < 0) { localFileList[i].dirName = options.dir + localFileList[i].dirName; deleteOne(localFileList[i].GetFullName(), Util.S_ISDIR(localFileList[i].mode)); } } } }
public void DeleteFiles(List <FileStruct> fileList) { var argv = new string[1]; List <FileStruct> localFileList = null; if (_options.CvsExclude) { Exclude.AddCvsExcludes(); } for (var j = 0; j < fileList.Count; j++) { if ((fileList[j].Mode & Options.FlagTopDir) == 0 || !Util.S_ISDIR(fileList[j].Mode)) { continue; } argv[0] = _options.Dir + fileList[j].GetFullName(); var fList = new FileList(_options); if ((localFileList = fList.SendFileList(null, argv)) == null) { continue; } for (var i = localFileList.Count - 1; i >= 0; i--) { if (localFileList[i].BaseName == null) { continue; } localFileList[i].DirName = localFileList[i].DirName.Substring(_options.Dir.Length); if (FileList.FileListFind(fileList, (localFileList[i])) < 0) { localFileList[i].DirName = _options.Dir + localFileList[i].DirName; DeleteOne(localFileList[i].GetFullName(), Util.S_ISDIR(localFileList[i].Mode)); } } } }
public void DeleteFiles(ArrayList fileList) { string[] argv = new string[1]; ArrayList localFileList = null; if (options.cvsExclude) { Exclude.AddCvsExcludes(); } for (int j = 0; j < fileList.Count; j++) { if ((((FileStruct)fileList[j]).mode & Options.FLAG_TOP_DIR) == 0 || !Util.S_ISDIR(((FileStruct)fileList[j]).mode)) { continue; } argv[0] = options.dir + ((FileStruct)fileList[j]).FNameTo(); FileList fList = new FileList(options); if ((localFileList = fList.sendFileList(null, argv)) == null) { continue; } for (int i = localFileList.Count - 1; i >= 0; i--) { if (((FileStruct)localFileList[i]).baseName == null) { continue; } ((FileStruct)localFileList[i]).dirName = ((FileStruct)localFileList[i]).dirName.Substring(options.dir.Length); if (FileList.fileListFind(fileList, ((FileStruct)localFileList[i])) < 0) { ((FileStruct)localFileList[i]).dirName = options.dir + ((FileStruct)localFileList[i]).dirName; deleteOne(((FileStruct)localFileList[i]).FNameTo(), Util.S_ISDIR(((FileStruct)localFileList[i]).mode)); } } } }