这个问题来自论坛提问其实这个函数类库中还有其他等效的函数这一系列函数的返回结果都是文件名组成的数组那么他们的默认顺序是根据什么来排列的?开始随口回答人家说是文件名当然被人小小的bs了一下稍微考虑一下这系列函数无非是通过FindFirstFile和FindNextFile这些widows api函数来实现的拿这些函数的默认顺序是什么呢msdn了一下得到如下结果 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 大致意思是 NTFS和CDFS下是按照字母顺序而FAT下按照文件创建时间顺序 |