Exemplo n.º 1
0
        IEnumerable <WrappedFileSystemInfo> Execute()
        {
            var includedFiles = from include in includes
                                from file in Glob.GlobResults(FixupPath(include))
                                select file;

            var excludesFiles = from exclude in excludes
                                from file in Glob.GlobResults(FixupPath(exclude))
                                select file;

            foreach (var path in includedFiles.Except(excludesFiles))
            {
                if (Directory.Exists(path))
                {
                    yield return(new WrappedDirectoryInfo(baseDir, path, flatten));
                }
                else
                {
                    yield return(new WrappedFileInfo(baseDir, path, flatten));
                }
            }
        }