Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm writing a program to handle the xbox 360's STFS files. I'm encountering all sorts of problems about how to keep track of used vs unused blocks, reading non-sequential files, etc. These aren't so much problems with the structure of STFS - it's just another file structure - but I don't know how I should do certain things.

I thought I would find a plethora of information on how file systems like NTFS and Fat32 are read by programs, but I'm only finding resources on how to work with the file systems using pre-made software and not so much how to make such software.

Here is a reference for STFS:

share|improve this question
that is handled mostly by the OS – ratchet freak Apr 30 '12 at 20:10
up vote 4 down vote accepted

I can recommend "Practical File System Design with the Be File System" (free download from the author's website). It's a great introduction (that goes into quite a lot of detail) to the concepts relevant in filesystems.

share|improve this answer

NTFS is propritary and patent encumbered, you won't find anything very useful offically about it from Microsoft publicly available. Microsoft charges a lot of money to hand out the details about it and the ability to commercially use it.

FAT32 is also patent encumbered, but has been worked around by the Linux/Open Source community. Microsoft has yet to file any lawsuits against any Linux vendors but Microsoft sued TomTom over their use.

Your best bet to read up on the open source file systems that are available, code speaks volumes. Study the structure of database files as well, those are closer in theory to STFS than actual file systems in many cases.

share|improve this answer
Do you know where I could find code for reading database files? – mowwwalker Apr 30 '12 at 21:48
Linux also has NTFS drivers for years. It used to have NTFS drivers providing read-access to NTFS filesystems for decades. (Well, at least 1 decade.) – Ingo May 1 '12 at 9:15
Actually, the Linux-NTFS project has outstanding documentation on the NTFS filesystem. In fact, one of the Linux-NTFS lead developers once said that according to their web server logs, their docs actually seem to be used inside Microsoft as well. – Jörg W Mittag May 1 '12 at 12:03

You're talking about a filesystem driver. I'm not sure how much information you'll find on how to write them, because very few people need to do it, and the ones that do mostly know what they're doing.

One resource would be to look at the linux kernel code.

share|improve this answer

You're probably going to have to read in raw blocks and parse them yourself. The docs you linked to give the header layouts, you need to read and parse those and then use that information to get the content. I'd recommend a language like C that lets you use pointers and map data structures directly over byte buffers, but there's no reason you couldn't read a byte stream and build up your metadata from that, if your language of choice doesn't give you control over data structure layout. I'd also recommend dumping blocks out in hex and hand-parsing them to start -- it's often useful to know what the actual bytes are so you can quickly spot endian or type boundary issues.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.