コード例 #1
0
ファイル: FileSet.cs プロジェクト: nbucket/NBucket.Bounce
		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
					});
		}