zoukankan      html  css  js  c++  java
  • DirectInfo.GetFiles返回数组的默认排序

    这个问题来自论坛提问,其实这个函数在.net类库中还有其他等效的函数,这一系列函数的返回结果都是文件名组成的数组,那么他们的默认顺序是根据什么来排列的?开始随口回答人家说是文件名,当然被人小小的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下,按照文件创建时间顺序

  • 相关阅读:
    听说,好久不更了......
    JavaScript中数组常用方法
    html5常用英语单词
    重写与重载的区别
    RelativeLayout以及ListView
    树莓派基础配置
    通过yum安装lnmp-phpmyadmin
    POJ1850
    基于字典序的组合生成算法
    全排序之字典排序
  • 原文地址:https://www.cnblogs.com/cl1024cl/p/6204855.html
Copyright © 2011-2022 走看看