package system
import "github.com/moby/buildkit/util/system"
Index ¶
- Constants
- func Atime(st iofs.FileInfo) (time.Time, error)
- func CheckSystemDriveAndRemoveDriveLetter(path string) (string, error)
- func DefaultPathEnv(os string) string
Constants ¶
const DefaultPathEnvUnix = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
DefaultPathEnvUnix is unix style list of directories to search for executables. Each directory is separated from the next by a colon ':' character .
const DefaultPathEnvWindows = "c:\\Windows\\System32;c:\\Windows"
DefaultPathEnvWindows is windows style list of directories to search for executables. Each directory is separated from the next by a colon ';' character .
Functions ¶
func Atime ¶
func CheckSystemDriveAndRemoveDriveLetter ¶
CheckSystemDriveAndRemoveDriveLetter verifies and manipulates a Windows path. This is used, for example, when validating a user provided path in docker cp. If a drive letter is supplied, it must be the system drive. The drive letter is always removed. Also, it translates it to OS semantics (IOW / to \). We need the path in this syntax so that it can ultimately be contatenated with a Windows long-path which doesn't support drive-letters. Examples: C: --> Fail C:\ --> \ a --> a /a --> \a d:\ --> Fail
func DefaultPathEnv ¶
Source Files ¶
atime_windows.go path.go path_windows.go
- Version
- v0.11.0-rc1
- Published
- Nov 24, 2022
- Platform
- windows/amd64
- Imports
- 7 packages
- Last checked
- 3 hours ago –
Tools for package owners.