您的位置:首页 > 其它

DirectInfo.GetFiles 排序

2016-07-24 00:00 225 查看
The order in which this function returns the file names is dependent on the file system type. With NTFS and CDFS file systems, the names are returned in alphabetical order. With FAT file systems, the names are returned in the order the files were written to the disk, which may or may not be in alphabetical order.

DirectoryInfo di = new DirectoryInfo(@"d:/test/");

var files = di.GetFiles().OrderBy(f => f.Name);

var files = di.GetFiles().OrderBy(f => f.LastWriteTime);
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: