tags:

views:

198

answers:

2

how does the computer retrive a particular entry in the MFT table for a file or directory? I read through many documents which describe the structure of NTFS and MFT, but i fail to understand say i have a file in E:\documents\test.txt, how can i identify it's entry in the MFT index. Is it sequential?

A: 

NTFS uses B+trees internally for the file indexes. A B+tree is a binary tree. This article is as good an explanation as any w/r to how B+trees work.

Christopher
thanks, so if i go about implementing enumerating all files and directory in a folder, there is no place i can start from? I will have to iterate through all entries? like in FAT32 where there is an entry for Root, isn't there such entry poing in MFT
Anirudh Goel
NTFS uses B trees, not B+ trees. FYI.
jrtipton
A: 

I implemented a readonly ntfs library (UMFS) in the distant past.

The root directory of a volume is always stored in mft record 5. Once you can read the data stream for the directory, you can walk the b+tree (as @Christopher said) stored in the stream, finding the subdirectory or file you are interested in.

Trevor Harrison