Baseline.FileSet.IncludedFilesFor C# (CSharp) Method

IncludedFilesFor() public method

public IncludedFilesFor ( string path ) : IEnumerable
path string
return IEnumerable
        public IEnumerable<string> IncludedFilesFor(string path)
        {
            var directory = new DirectoryInfo(path);

            return directory.Exists
                ? getAllDistinctFiles(path, Include.IsEmpty() ? "*.*" : Include)
                : new string[0];
        }

Usage Example

コード例 #1
0
ファイル: FileSystem.cs プロジェクト: tralivali1234/baseline
        public IEnumerable <string> FindFiles(string directory, FileSet searchSpecification)
        {
            var excluded = searchSpecification.ExcludedFilesFor(directory).ToArray();
            var files    = searchSpecification.IncludedFilesFor(directory).ToList();

            files.RemoveAll(s => excluded.Contains(s));

            return(files);
        }