Documentation
¶
Index ¶
Constants ¶
const ( BINDFLT_FLAG_READ_ONLY_MAPPING uint32 = 0x00000001 // Tells bindflt to fail mapping with STATUS_INVALID_PARAMETER if a mapping produces // multiple targets. BINDFLT_FLAG_NO_MULTIPLE_TARGETS uint32 = 0x00000040 )
BfSetupFilter flags. See: https://github.com/microsoft/BuildXL/blob/a6dce509f0d4f774255e5fbfb75fa6d5290ed163/Public/Src/Utilities/Native/Processes/Windows/NativeContainerUtilities.cs#L193-L240
const ( BINDFLT_GET_MAPPINGS_FLAG_VOLUME uint32 = 0x00000001 BINDFLT_GET_MAPPINGS_FLAG_SILO uint32 = 0x00000002 BINDFLT_GET_MAPPINGS_FLAG_USER uint32 = 0x00000004 )
Variables ¶
This section is empty.
Functions ¶
func ApplyFileBinding ¶
ApplyFileBinding creates a global mount of the source in root, with an optional read only flag. The bind filter allows us to create mounts of directories and volumes. By default it allows us to mount multiple sources inside a single root, acting as an overlay. Files from the second source will superscede the first source that was mounted. This function disables this behavior and sets the BINDFLT_FLAG_NO_MULTIPLE_TARGETS flag on the mount.
func RemoveFileBinding ¶
RemoveFileBinding removes a mount from the root path.
Types ¶
type BindMapping ¶
func GetBindMappings ¶
func GetBindMappings(volumePath string) ([]BindMapping, error)
GetBindMappings returns a list of bind mappings that have their root on a particular volume. The volumePath parameter can be any path that exists on a volume. For example, if a number of mappings are created in C:\ProgramData\test, to get a list of those mappings, the volumePath parameter would have to be set to C:\ or the VOLUME_NAME_GUID notation of C:\ (\\?\Volume{GUID}\), or any child path that exists.