Does NTFS have extended file attributes and how do I read/write them on windows?

131 Views Asked by At

I'm writing a cross-platform app that needs to keep track of files that may also be worked on by other software, most notably the default file explorer app of whichever platform. To do this, I attach an ID to each file and directory that I'm keeping tabs on. On linux and macos I've been using xattr to store an ID and on windows I have ADS.

This almost works perfectly, almost. I'm not sure whether this is on purpose or not but starting with windows 8, the explorer app does not copy ADS attributes when I copy directories. That leaves me in a spot where I'm unable to determine whether a directory has been copied or if its a brand new directory - it may seem meaningless but for my purposes its not. Regardless, I'm not hoping for this to be fixed so I'm looking at alternatives.

TLDR skip here: Wikipedia claims that NTFS has its own version of xattr (that I'm assuming is not actually just ADS) but I've been unable to find any information about how to work it. Does anyone have a clue? Some obscure library anybody knows about? Language doesn't really matter, ill make it work, just need some clue.

0

There are 0 best solutions below