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);
DirectoryInfo di = new DirectoryInfo(@"d:/test/");
var files = di.GetFiles().OrderBy(f => f.Name);
var files = di.GetFiles().OrderBy(f => f.LastWriteTime);
相关文章推荐
- oracle 取当前日期时间的前一天前一小时前一分钟前一秒
- ubuntu server版配置关闭系统自动更新
- Java security KeyStore Cipher
- linux 实时观察文件行数变化
- 要搞清楚对象和对象的引用
- gdb入门
- 有了数据库还需要把由用户自定义的配置信息写到xml文件里面吗
- tomcat配置https ssl
- apache resin 端口关联
- 传递带空格的参数给linux shell中的java命令
- 右键菜单打开文件所在文件夹的插件EasyExplore
- commons-httpclient和htmlparser应用之博客搬家
- 更改java.util.List中的对象引用String java.util.List.set(int index, String element)
- Linux程序员必读:中文化与GB18030标准
- JBuilder中切换编辑文件标签的键盘快捷键
- J2EE的13种核心技术
- 如何学习 Linux
- Linux 主机规划与磁盘分区
- 2011程序员薪资调查报告全文发布
- 从rails开始的胡思乱想