Skip to content

feat(winfsp): support GetStreamInfo for listing named streams - #31

Open
jaredeh wants to merge 1 commit into
winfsp:masterfrom
jaredeh:get-stream-info
Open

jaredeh wants to merge 1 commit into
winfsp:masterfrom
jaredeh:get-stream-info

Conversation

@jaredeh

@jaredeh jaredeh commented Oct 25, 2026

Copy link
Copy Markdown

FSP_FILE_SYSTEM_INTERFACE has a GetStreamInfo slot, but nothing wires it, so a file system can't list a file's named streams: FindFirstStreamW, dir /r, PowerShell's Get-Item -Stream and CopyFile's stream copy all depend on it.

Add BehaviourGetStreamInfo and its delegate, and the helpers FileSystemAddStreamInfo and FileSystemAddStreamInfoEnd, Go versions of FspFileSystemAddStreamInfo like the existing FileSystemAddDirInfo. The helpers write the entry bytes themselves rather than go through FSP_FSCTL_STREAM_INFO, whose name is a variable-length WCHAR array in C. Implementing the behaviour also sets FspFSAttributeNamedStreams, which tells Windows the volume has named streams, as
BehaviourGetReparsePointByName sets FspFSAttributeReparsePoints.

Refs #10.

FSP_FILE_SYSTEM_INTERFACE has a GetStreamInfo slot, but nothing wires it,
so a file system can't list a file's named streams: FindFirstStreamW,
dir /r, PowerShell's Get-Item -Stream and CopyFile's stream copy all
depend on it.

Add BehaviourGetStreamInfo and its delegate, and the helpers
FileSystemAddStreamInfo and FileSystemAddStreamInfoEnd, Go versions of
FspFileSystemAddStreamInfo like the existing FileSystemAddDirInfo. The
helpers write the entry bytes themselves rather than go through
FSP_FSCTL_STREAM_INFO, whose name is a variable-length WCHAR array in C.
Implementing the behaviour also sets FspFSAttributeNamedStreams, which
tells Windows the volume has named streams, as
BehaviourGetReparsePointByName sets FspFSAttributeReparsePoints.

Refs winfsp#10.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant