0

If I do a stat on a file of a exfat file system, it does provide me the modify/change/creation times.

Is there a way to find if the file name has changed? I know there are likely lower level commands to find information about files, locations of names etc, but how do I access these?

Where does a exfat file system store the name of a file? Is there a way to access where the name of a file is located, and see if the location was updated later than when the file was created?

1 Answer 1

1

Is there a way to find if the file name has changed?

No such information is stored, so, no.

Where does a exfat file system store the name of a file?

In exFAT, each directory has a directory entries table (in fact, a primary and secondary ones, the secondary tables are where the File Name Directory Entries are). File names longer than 15 bytes are split across multiple entries (and Windows traditionally uses WCHAR, 2 Bytes, per character anyways, so Microsoft seems to have elected to use UTF-16 as encoding for these).

Is there a way to access where the name of a file is located, and see if the location was updated later than when the file was created?

The directory structure in FAT file systems (including exFAT) is a linear table, and the mounting operating system can reorder that table however it sees fit (which does happen, if I remember correctly, because it's a bad idea to have the files most recently added at the end of the list, as it takes longest to find them, and because on flash memory, you can't update single bytes anyways, but always have to update a whole block – so that an update to the list of files in a directory can also be written back in a more sensible order than "order of addition"; it has to happen occasionally, to move unused entries after deletion to the end – otherwise new multipart entries might not fit anywhere).

Even if the order of addition of a file to the directory was preserved, you couldn't infer on renaming relative to creation, anyways, so: The information you're looking for simply doesn't exist.

3
  • I'll admit I wasn't sure what the correct terminology there was, and whether the list of Dir Entries was also called a FAT; it seems I was wrong, so let me fix that. Commented Sep 7, 2024 at 11:42
  • 1
    that terminology is from microsofts' exfat specs; the secondary is not a backup of the first, but a pretty different thing in itself. Commented Sep 7, 2024 at 19:45
  • Ah, right, thanks! Commented Sep 7, 2024 at 20:42

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.