EnumerateFileSystemInfos() public abstract method

public abstract EnumerateFileSystemInfos ( string fullPath, string searchPattern, SearchOption searchOption, SearchTarget searchTarget ) : IEnumerable
fullPath string
searchPattern string
searchOption SearchOption
searchTarget SearchTarget
return IEnumerable
Esempio n. 1
0
        private IEnumerable <FileSystemInfo> InternalEnumerateFileSystemInfos(string searchPattern, SearchOption searchOption)
        {
            Debug.Assert(searchPattern != null);
            Debug.Assert(searchOption == SearchOption.AllDirectories || searchOption == SearchOption.TopDirectoryOnly);

            return(FileSystem.EnumerateFileSystemInfos(FullPath, searchPattern, searchOption, SearchTarget.Both));
        }
Esempio n. 2
0
        // Returns an array of Directories in the current DirectoryInfo matching the
        // given search criteria (i.e. "System*" could match the System & System32
        // directories).
        private DirectoryInfo[] InternalGetDirectories(string searchPattern, SearchOption searchOption)
        {
            Debug.Assert(searchPattern != null);
            Debug.Assert(searchOption == SearchOption.AllDirectories || searchOption == SearchOption.TopDirectoryOnly);

            IEnumerable <DirectoryInfo> enumerable = (IEnumerable <DirectoryInfo>)FileSystem.EnumerateFileSystemInfos(FullPath, searchPattern, searchOption, SearchTarget.Directories);

            return(EnumerableHelpers.ToArray(enumerable));
        }