internal override DirectoryInfo CreateObject(SearchResult result)
        {
            String            name             = result.FullPath;
            IFileSystemObject fileSystemObject = new Win32FileSystem.Win32FileSystemObject(name, result.FindData, asDirectory: true);
            DirectoryInfo     di = new DirectoryInfo(name, fileSystemObject);

            return(di);
        }
        internal override FileInfo CreateObject(SearchResult result)
        {
            String            name             = result.FullPath;
            IFileSystemObject fileSystemObject = new Win32FileSystem.Win32FileSystemObject(name, result.FindData, asDirectory: false);
            FileInfo          fi = new FileInfo(name, fileSystemObject);

            return(fi);
        }
            internal override bool IsResultIncluded(string fullPath, string userPath, ref Interop.mincore.WIN32_FIND_DATA findData, out DirectoryInfo result)
            {
                if (Win32FileSystemEnumerableHelpers.IsDir(ref findData))
                {
                    string            fullPathFinal    = Path.Combine(fullPath, findData.cFileName);
                    IFileSystemObject fileSystemObject = new Win32FileSystem.Win32FileSystemObject(fullPathFinal, findData, asDirectory: true);
                    result = new DirectoryInfo(fullPathFinal, fileSystemObject);
                    return(true);
                }

                result = null;
                return(false);
            }
        internal override FileSystemInfo CreateObject(SearchResult result)
        {
            bool   isFile = Win32FileSystemEnumerableHelpers.IsFile(result.FindData);
            bool   isDir  = Win32FileSystemEnumerableHelpers.IsDir(result.FindData);
            String name   = result.FullPath;

            if (isDir)
            {
                IFileSystemObject fileSystemObject = new Win32FileSystem.Win32FileSystemObject(name, result.FindData, asDirectory: true);
                DirectoryInfo     di = new DirectoryInfo(name, fileSystemObject);
                return(di);
            }
            else
            {
                Contract.Assert(isFile);
                IFileSystemObject fileSystemObject = new Win32FileSystem.Win32FileSystemObject(name, result.FindData, asDirectory: false);
                FileInfo          fi = new FileInfo(name, fileSystemObject);
                return(fi);
            }
        }