예제 #1
0
        private static IFileInfo[] ConvertFileArray(FileInfo[] fileInfos)
        {
            var arr = new IFileInfo[fileInfos.Length];

            for (var i = 0; i < fileInfos.Length; i++)
            {
                arr[i] = DefaultFileInfo.FromFileInfo(fileInfos[i]);
            }

            return(arr);
        }
예제 #2
0
        public static IFileSystemInfo FromFileSystemInfo(FileSystemInfo fsInfo)
        {
            var dirInfo = fsInfo as DirectoryInfo;

            if (dirInfo != null)
            {
                return(DefaultDirectoryInfo.FromDirectoryInfo(dirInfo));
            }

            var fileInfo = fsInfo as FileInfo;

            if (fileInfo != null)
            {
                return(DefaultFileInfo.FromFileInfo(fileInfo));
            }

            return(null);
        }
예제 #3
0
 private bool Equals(DefaultFileInfo other)
 {
     return Equals(_fileInfo, other._fileInfo);
 }
예제 #4
0
 private bool Equals(DefaultFileInfo other)
 {
     return(Equals(_fileInfo, other._fileInfo));
 }