hutianyue
驱动牛犊
驱动牛犊
  • 注册日期2003-06-16
  • 最后登录2003-12-08
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
阅读:1250回复:4

fat的问题

楼主#
更多 发布于:2003-09-29 11:11
fat文档(从该网站下载的fat32.pdf)第23页介绍dir sttucture 中的内容

   • If DIR_Name[0] == 0xE5, then the directory entry is free (there is no file or directory name in this
entry).
• If DIR_Name[0] == 0x00, then the directory entry is free (same as for 0xE5), and there are no
allocated directory entries after this one (all of the DIR_Name[0] bytes in all of the entries after
this one are also set to 0).
The special 0 value, rather than the 0xE5 value, indicates to FAT file system driver code that the
rest of the entries in this directory do not need to be examined because they are all free.
• If DIR_Name[0] == 0x05, then the actual file name character for this byte is 0xE5. 0xE5 is
actually a valid KANJI lead byte value for the character set used in Japan. The special 0x05 value
is used so that this special file name case for Japan can be handled properly and not cause FAT file
system code to think that the entry is free.
这里说得0xe5和0x00的意思有点模糊,我的理解0x00是指这是改簇的一条free记录,以后的记录全部都是free的,可是搜索的时候却总是落掉一些文件,后来我改成0x00指的是扇区第一个free记录,接着往下搜索其他的扇区就可以了,不知道是不是改这么理解
hutianyue
驱动牛犊
驱动牛犊
  • 注册日期2003-06-16
  • 最后登录2003-12-08
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2003-09-29 11:15
我得程序是在vmware中编的,不知道这会不会有影响
hrbljh
驱动牛犊
驱动牛犊
  • 注册日期2002-04-13
  • 最后登录2004-10-13
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
板凳#
发布于:2003-10-07 10:21
如果有长文件名的话,还要判断是否为long name entry, 即attrib是否为0x0F
hutianyue
驱动牛犊
驱动牛犊
  • 注册日期2003-06-16
  • 最后登录2003-12-08
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
地板#
发布于:2003-10-07 14:09
这个我已经考虑了
seaquester
驱动大牛
驱动大牛
  • 注册日期2002-05-22
  • 最后登录2016-06-16
  • 粉丝0
  • 关注0
  • 积分500分
  • 威望115点
  • 贡献值0点
  • 好评度107点
  • 原创分0分
  • 专家分52分
地下室#
发布于:2003-10-08 11:56
fat文档(从该网站下载的fat32.pdf)第23页介绍dir sttucture 中的内容

   • If DIR_Name[0] == 0xE5, then the directory entry is free (there is no file or directory name in this
entry).
• If DIR_Name[0] == 0x00, then the directory entry is free (same as for 0xE5), and there are no
allocated directory entries after this one (all of the DIR_Name[0] bytes in all of the entries after
this one are also set to 0).
The special 0 value, rather than the 0xE5 value, indicates to FAT file system driver code that the
rest of the entries in this directory do not need to be examined because they are all free.
• If DIR_Name[0] == 0x05, then the actual file name character for this byte is 0xE5. 0xE5 is
actually a valid KANJI lead byte value for the character set used in Japan. The special 0x05 value
is used so that this special file name case for Japan can be handled properly and not cause FAT file
system code to think that the entry is free.
这里说得0xe5和0x00的意思有点模糊,我的理解0x00是指这是改簇的一条free记录,以后的记录全部都是free的,可是搜索的时候却总是落掉一些文件,后来我改成0x00指的是扇区第一个free记录,接着往下搜索其他的扇区就可以了,不知道是不是改这么理解
 



DIR_Name[0] 是指 FDT 表中相应项的第一个字节, 如果它是 0xE5, 表示directory entry是没有使用的,(当文件或目录被删除时,会写这个值)。
八风舞遥翩,九野弄清音。 鸣高常向月,善舞不迎人。
游客

返回顶部