您现在的位置是:首页 >

函数怎么返回一个数组 DirectInfo.GetFiles返回数组的默认排序

火烧 2022-11-10 14:36:31 1052
DirectI fo.GetFile 返回数组的默认排序 这个问题来自论坛提问 其实这个函数类库中还有其他等效的函数 这一系列函数的返回结果都是文件名组成的数组 那么他们的默认顺序是根据什么来排列的?

DirectInfo.GetFiles返回数组的默认排序  

函数怎么返回一个数组 DirectInfo.GetFiles返回数组的默认排序
      这个问题来自论坛提问 其实这个函数类库中还有其他等效的函数 这一系列函数的返回结果都是文件名组成的数组 那么他们的默认顺序是根据什么来排列的?开始随口回答人家说是文件名 当然被人小小的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下 按照文件创建时间顺序 lishixinzhi/Article/program/ASP/201311/21699  
永远跟党走
  • 如果你觉得本站很棒,可以通过扫码支付打赏哦!

    • 微信收款码
    • 支付宝收款码