longpath

package
v25.0.17+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 14, 2026 License: Apache-2.0 Imports: 3 Imported by: 199 modules, 427 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

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

Constants

View Source
const Prefix = `\\?\`

Prefix is the longpath prefix for Windows file paths.

Variables

This section is empty.

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.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL