Searching \ for '[EE]: file structure - beyond the FAT' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=file+structure+beyond
Search entire site for: 'file structure - beyond the FAT'.

Exact match. Not showing close matches.
PICList Thread
'[EE]: file structure - beyond the FAT'
2002\11\14@084428 by John Walshe

flavicon
face
Does anyone know, or have pointers to, how a file is stored on a FAT
formatted disk (IDE or CFlash in IDE mode). I have all the information I
need on the FAT(16 or 32) but I cannot find that last step that describes
how the file itself is structured. I believe it is in a linked list form but
I cannot find a description of how this is deciphered.
Basically I'm trying to figure out how I can create/modify a file on a
Cflash that can later be read by an application on my PC. Initially the
application would create the file on the cflash which is then moved to a
handheld device. I wish to add data to that file on an ongoing basis via the
handheld unit, and at the end of the day just remove the cflash  to my PC
for the last bit of work.

The overall application is to create a handheld GPS based mapping unit
specific to the needs of Orienteering maps( what I do when I'm not working
with pics!) . As a project it does indeed cover a lot of bases. At the
moment it is making its way from my head to paper(CAD!) so if anyone has any
comments please shoot ahead.

Slan
John

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics




2002\11\14@085624 by Alan B. Pearce

face picon face
>Does anyone know, or have pointers to, how a file is stored
>on a FAT formatted disk (IDE or CFlash in IDE mode). I have
>all the information I need on the FAT(16 or 32) but I cannot
>find that last step that describes how the file itself is
>structured. I believe it is in a linked list form but I
>cannot find a description of how this is deciphered.

The FAT table is itself the linked list. The data in the sectors is just a
continuous long length of data. There is nothing within the sectors to
create any linkage.

You do have to remember that a FAT file system is made up of logical blocks,
and the FAT table is a linkage of those blocks, not of sectors. If you do
have the definitive Microsoft document on FAT file system, you must get it,
whatever else you may have. Look for a file called FATGEN103.PDF on their
website. The "103" portion of the filename may change, as this is the file
revision, but this is the version I have. The document contains a lot of
pseudo C code on how to access the files, and a lot of the gotcha's that
many people introduce by not doing things the way Microsoft do it.

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics




2002\11\14@092958 by rad0

picon face
this link to a project may be of some help to you

http://www.barrymichels.com/ide/


----- Original Message -----
From: "John Walshe" <spam_OUTJohn.WalsheTakeThisOuTspamINPACTMICRO.COM>
To: <.....PICLISTKILLspamspam@spam@MITVMA.MIT.EDU>
Sent: Thursday, November 14, 2002 7:41 AM
Subject: [EE]: file structure - beyond the FAT


> Does anyone know, or have pointers to, how a file is stored on a FAT
> formatted disk (IDE or CFlash in IDE mode). I have all the information I
> need on the FAT(16 or 32) but I cannot find that last step that describes
> how the file itself is structured. I believe it is in a linked list form
but
> I cannot find a description of how this is deciphered.
> Basically I'm trying to figure out how I can create/modify a file on a
> Cflash that can later be read by an application on my PC. Initially the
> application would create the file on the cflash which is then moved to a
> handheld device. I wish to add data to that file on an ongoing basis via
the
> handheld unit, and at the end of the day just remove the cflash  to my PC
> for the last bit of work.
>
> The overall application is to create a handheld GPS based mapping unit
> specific to the needs of Orienteering maps( what I do when I'm not working
> with pics!) . As a project it does indeed cover a lot of bases. At the
> moment it is making its way from my head to paper(CAD!) so if anyone has
any
{Quote hidden}

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics




2002\11\14@093006 by John Walshe

flavicon
face
Hi Alan,
   Thanks for that bit of info. I do have, and have read the Fatgen103
document. However I did not pick up what you have indicated as being the
only way. I thought there was more involved because the fatgen103 doesn't
explain how to keep track of a fragmented file. Contiguous files are fine -
since I can ensure that I have only one file on my cflash/disk at a time,
but I'm still curious about the split file.

Slan
John

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics




2002\11\14@131019 by Sean H. Breheny

face picon face
Hi John,

IIRC, for a fragmented file, it will simply be true that some FAT entries
will not point to the next FAT entry. The disk itself is just a whole bunch
of clusters that can be in (in the worst case) totally random order. The
FAT contains all the info about how to piece together the clusters to form
a file, and the directory structure tells you where to look in the FAT for
the first entry for a particular file.

Sean


At 02:24 PM 11/14/2002 +0000, you wrote:
{Quote hidden}

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics




2002\11\14@194103 by bmichels

flavicon
face
Correct, the file entry in the directory table tells the location of the first cluster and the length of the file in bytes.  Go to the offset in the FAT that the directory table entry points to and the number there will point you to the second cluster.  Lather, Rinse, Repeat until you read FFFF.  This marks the end of a file in the FAT.

On Thursday 14 November 2002 01:06 pm, you wrote:
{Quote hidden}

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics




More... (looser matching)
- Last day of these posts
- In 2002 , 2003 only
- Today
- New search...