usb mass storage: standard directory tree?

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
I'm developing a data logging application for a device.
I'm wondering if there's some standard that says where to put any
application's directories and files, or one is free to choose one.
I saw that digital cameras tend to use a DCIM dir, but I don't know if
that's a convention or a standard.
Thanks


Re: usb mass storage: standard directory tree?
Quoted text here. Click to load it

Standards are such a fine thing that everybody has his own standards...

--
Uwe Bonnes                 snipped-for-privacy@elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
We've slightly trimmed the long signature. Click to see the full one.
Re: usb mass storage: standard directory tree?

Quoted text here. Click to load it

There's a "standard" for digital cameras (DPOF) that allows the user to
select pictures for printing on the camera's user interface and have
this information automatically picked up by printers with card slots.
If you're not generating image files, then this is of no interest to
you and you can put your files wherever you like.

Just one thing: if your application is going to generate an arbitrary
number of files (vs. one single large logfile), you should put these
files in a subdirectory, not in the root. The reason for this is that
flash media are usually FAT12 or FAT16, and both these formats have a
fixed root directory size (usually 511 entries).


Re: usb mass storage: standard directory tree?

Quoted text here. Click to load it

I think the only reason that a sub-dir is used is because the number
of files that one my store in a FAT root dir is limited. The number
112 comes to mind, but that is for FAT-12 if I recall correctly.

Regards
  Anton Erasmus


Re: usb mass storage: standard directory tree?


Quoted text here. Click to load it

Note that this limit only applies to FAT12 and FAT16, where the root
directory is a special unique structure living between the FAT and the
data area. FAT32 implements the root directory as any other directory;
it has an allocation chain and can be extended to any desired size.


Site Timeline