package longpath

import "github.com/docker/docker/pkg/longpath"

Package longpath introduces some constants and helper functions for handling long paths in Windows.

Long paths are expected to be prepended with "\\?\" and followed by either a drive letter, a UNC server\share, or a volume identifier.

Index

Functions

func AddPrefix

func AddPrefix(path string) string

AddPrefix adds the Windows long path prefix to the path provided if it does not already have it.

func MkdirTemp

func MkdirTemp(dir, prefix string) (string, error)

MkdirTemp is the equivalent of os.MkdirTemp, except that on Windows the result is in Windows longpath format. On Unix systems it is equivalent to os.MkdirTemp.

Source Files

longpath.go

Version
v28.0.1+incompatible
Published
Feb 26, 2025
Platform
linux/amd64
Imports
3 packages
Last checked
3 minutes ago

Tools for package owners.