add directory study
This commit is contained in:
41
study/sabre/os/files/FileSystems/LF2.txt
Normal file
41
study/sabre/os/files/FileSystems/LF2.txt
Normal file
@@ -0,0 +1,41 @@
|
||||
From: noesis@ucscb.UCSC.EDU (Kyle Anthony York)
|
||||
Newsgroups: comp.os.msdos.programmer
|
||||
Subject: Re: Win95 FAT long file name storage?
|
||||
|
||||
ok, here goes:
|
||||
|
||||
long file names are stored as follows, i've been using direct sector
|
||||
access, so i don't know if findfirst(..) findnext(..) will work.
|
||||
|
||||
the long names are stored as unicode strings in the immediatly preceding
|
||||
entries. the entry attribute byte is 0x0f.
|
||||
|
||||
the long name format is also used whenever a filename has lower case
|
||||
characters, thus preserving case and backwards compatability.
|
||||
|
||||
so...if the name is ``abcdefghijklmnop'' and this is the first entry of a
|
||||
subdirectory:
|
||||
entry[0] = "."
|
||||
entry[1] = ".."
|
||||
entry[2] = "ijklmnop", attribute = 0x0f
|
||||
entry[3] = "abcdefgh", attribute = 0x0f
|
||||
entry[4] = "ABCDEF~1", attribute = normal
|
||||
|
||||
in addition to having the attribute 0x0f, the entry format is:
|
||||
BYTE 0 --- bit 7 = 1 if deleted, 0 if not
|
||||
6 = 1 if last block of extended entry, 0 if not
|
||||
5..0 = extended entry # (1..31)
|
||||
BYTE 1..10 --- first 5 characters in unicode ("abcde" becomes
|
||||
"a", 0, "b", 0, "c", 0, "d", 0, "e", 0
|
||||
BYTE 11 --- attribute (0x0f)
|
||||
BYTE 12 --- ?? unknown ??
|
||||
BYTE 13 --- ?? unknown ??
|
||||
BYTE 14..25 -- next 6 characters (in unicode)
|
||||
BYTE 26..27 --- 0x0000 (first cluster #)
|
||||
BYTE 28..31 --- last 4 characters (in unicode)
|
||||
|
||||
unused bytes are set to 0xff
|
||||
end of string is denoted by 0x00, 0x00
|
||||
|
||||
best o' luck
|
||||
--kyle
|
||||
Reference in New Issue
Block a user