客户突然说需要在项目上能显示完整的文件的时间属性, 比如最后修改时间.
NTFS的实现由于时间比较紧,就没有到网上找找看有没有已经实现的算法.如果谁知道有已经实现的算法的话请不吝告知啊.谢谢.
fat的就比较简单,在dir entry中,找到相关字段,进行以为操作即可,然后加上1980年的偏移就ok.
下面是fat的white paper的内容:
Date and Time Formats
Many FAT file systems do not support Date/Time other than DIR_WrtTime and DIR_WrtDate.
For this reason, DIR_CrtTimeMil, DIR_CrtTime, DIR_CrtDate, and DIR_LstAccDate are actually optional fields.
DIR_WrtTime and DIR_WrtDate must be supported, however. If the other da
NTFS的实现由于时间比较紧,就没有到网上找找看有没有已经实现的算法.如果谁知道有已经实现的算法的话请不吝告知啊.谢谢.
fat的就比较简单,在dir entry中,找到相关字段,进行以为操作即可,然后加上1980年的偏移就ok.
fno->fileinfo.year = (fno->fileinfo.fdate >> 9) + 1980;
fno->fileinfo.month = (fno->fileinfo.fdate >> 5) & 15;
fno->fileinfo.day = fno->fileinfo.fdate & 31;
fno->fileinfo.hour = (fno->fileinfo.ftime >> 11);
fno->fileinfo.minute = (fno->fileinfo.ftime >> 5) & 63,
fno->fileinfo.second = (fno->fileinfo.ftime & 31) * 2;
下面是fat的white paper的内容:
Date and Time Formats
Many FAT file systems do not support Date/Time other than DIR_WrtTime and DIR_WrtDate.
For this reason, DIR_CrtTimeMil, DIR_CrtTime, DIR_CrtDate, and DIR_LstAccDate are actually optional fields.
DIR_WrtTime and DIR_WrtDate must be supported, however. If the other da