Open ross-spencer opened 3 weeks ago
Hi Ross, this would be an incredible feature and I will put it on the roadmap!
Thanks for the input and code! There will be a branch.
I added first code to the branch. But as expected and you indicated that, there are some problems we face checking for ADS. When you mount a NTFS from Linux, then it depends on the driver/module how this is handled. ":" is handled as part of the filename, so a driver in Linux might just drop the stream. Or it does not show the stream, then you have to "guess" the stream name (which makes no sense). Same for handling xattrs, mounted on Windows. So there are some hurdles :)
Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Report on xattrs associated with files.
Describe the solution you'd like A clear and concise description of what you want to happen.
xattrs might exist for file objects on file systems that support them and they might contain useful metadata, see related projects I have been following (cc. @pjotrek-b):
^^ nb. your involvement would be awesome too Steffen.
But also, they may also exist for steganographic purposes or the hiding of information, see NTFS: https://blog.netwrix.com/2022/12/16/alternate_data_stream/.
In the first instance, a flag that streams exist would be great. In a further output from a tool (maybe FileTrove) listing those for archival objects would also be interesting.
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
No alternatives, but there is a catch here in that Nix like systems seem to behave similarly to each other, but NTFS alternate streams are more arbitrary in nature, e.g. they don't have (I believe) namespaces.
Example code using: https://pkg.go.dev/github.com/pkg/xattr#section-readme
And a script to output a sample file with xattrs:
Script output: