示例#1
0
 private FileInfo ToFileInfo(System.IO.FileInfo file)
 {
     return(new FileInfo
     {
         Icon = IconReader.GetFileIcon(file.FullName),
         Name = file.Name,
         Type = FileTypeReader.GetFileType(file.FullName),
         Created = file.CreationTime,
         Modified = file.LastWriteTime
     });
 }
示例#2
0
 private FileInfo ToFileInfo(DirectoryInfo directory)
 {
     return(new FileInfo
     {
         Icon = IconReader.GetFolderIcon(directory.FullName),
         Name = directory.Name,
         Type = FileTypeReader.GetFileType(directory.FullName),
         Created = directory.CreationTime,
         Modified = directory.LastWriteTime,
         IsFolder = true
     });
 }