gofilesystemsntfsalternate-data-stream

How to access and modify alternate data streams (ADS) with go


How can I access and modify metadata stored in NTFS alternate data streams with golang?

I already know about https://github.com/pkg/xattr for accessing metadata stored in extended attribures under linux. However, i need comparable functionality for NTFS.


Solution

  • Alternate data streams can be accessed using ":StreamName" syntax when opening a file in NTFS.

    ads, err := os.Open("C:\Path\To\My\File:MyHiddenStream")
    if err != nil {
        panic(err)
    }