Closed rucat closed 6 years ago
If by list of files you mean file system hierarchy have a look at https://github.com/libyal/libfsntfs/blob/master/fsntfstools/info_handle.c#L3474 and https://github.com/libyal/libfsntfs/blob/master/fsntfstools/info_handle.c#L4755
How do I get the file name by file_entry?
Have a look at https://github.com/libyal/libfsntfs/blob/master/fsntfstools/info_handle.c#L3584
Is it possible to find out what sectors the file occupies by file_entry?
Yes https://github.com/libyal/libfsntfs/blob/master/include/libfsntfs.h.in#L976
@joachimmetz Thank you very much, it really helped me.
And one more question:) Is it possible to find out in which cluster (or physical offset) the mft record is located?
Thank you.
Is it possible to find out in which cluster (or physical offset) the mft record is located?
If you mean "physical disk offset" then the answer is no. See the discussion about LBA versus CHS https://en.wikipedia.org/wiki/Cylinder-head-sector
If you actually did not mean physical offset, but the offset of file data relative to the start of volume, the answer is "it depends". Have you looked at libfsntfs_file_entry_get_number_of_extents and libfsntfs_file_entry_get_extent_by_index?
Yes, I mean, offset of the start of volume, aI also looked libfsntfs_file_entry_get_number_of_extents and libfsntfs_file_entry_get_extent_by_index functions, but i want to find offset of MFT record (no file data) by file_entry. What I want to do - print all files with sectors occupied by the file. If file is non-resident, i use libfsntfs_file_entry_get_number_of_extents + libfsntfs_file_entry_get_extent_by_index, but if it resident...
For now you could use libfsntfs_file_entry_get_file_reference
to determine the MFT entry; based on the MFT entry (record) size and the extents of the $MFT file you should be able to determine those extents.
No further questions from reporter closing issue.
Hi! Could you help me with using your libary, please? I wanna to write a simple program to get a list of files of the drive.
This my code:
How do I get the file name by file_entry?
Is it possible to find out what sectors the file occupies by file_entry? I will be glad to any advice.
Thanks.