Exemple #1
0
		public FileSet()
		{
			baseDirectory = AppDomain.CurrentDomain.BaseDirectory;
			directoryScannerForIncludes = new DirectoryScanner();
			directoryScannerForExcludes = new DirectoryScanner();
			pathScannerForIncludes = new PathScanner();
			pathScannerForExcludes = new PathScanner();
			includeSearchPatternsForRemoval = new List<string>();
			excludeSearchPatternsForRemoval = new List<string>();
			AllDirectories = new List<FileSetDirectory>();
			AllFiles = new List<FileSetFile>();
			SearchPatterns = new List<SearchPattern>();
		}
Exemple #2
0
		private void UpdateAfterScan(DirectoryScanner directoryScanner, PathScanner pathScanner, bool isForExclude = false)
		{
			foreach (var item in directoryScanner.DirectoryNames)
			{
				if (Directory.Exists(item))
					AllDirectories.Add(
						new FileSetDirectory
						{
							IsIncluded = !isForExclude,
							IsExcluded = isForExclude,
							DirectoryFullName = item
						});
				else
					AllFiles.Add(
						new FileSetFile
						{
							IsIncluded = !isForExclude,
							IsExcluded = isForExclude,
							FileFullName = item
						});
			}

			foreach (var item in directoryScanner.FileNames)
				AllFiles.Add(
					new FileSetFile
					{
						IsIncluded = !isForExclude,
						IsExcluded = isForExclude,
						FileFullName = item
					});

			foreach (var item in pathScanner.Scan())
				AllFiles.Add(
					new FileSetFile
					{
						IsIncluded = !isForExclude,
						IsExcluded = isForExclude,
						FileFullName = item
					});
		}