Skip to main content

split_path_stream

Function split_path_stream 

Source
pub fn split_path_stream(path: &str) -> (&str, Option<&str>)
Expand description

Split a Dokan path into its file part and an optional NTFS Alternate Data Stream name, so a create_file on \dir\file:4n6.status resolves \dir\file and remembers the 4n6.status stream.

An ADS suffix (:name) is only ever on the final path component, and : is illegal in a normal Windows filename, so the split is unambiguous. The :$DATA stream-type suffix is stripped, and the unnamed main stream — no suffix, or the explicit ::$DATA — yields None.