Documentation
¶
Index ¶
- func IsNFS(path string) (bool, error)
- func WindowsSubsystemPath(_ context.Context, _ string) (string, error)
- func WindowsSubsystemPathForLinux(_ context.Context, _, _ string) (string, error)
- func WindowsSubsystemPathWithCygpath(_ context.Context, _, _ string) (string, error)
- func WriteFileAtomic(path string, data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsNFS ¶
IsNFS checks if the path is on NFS. If the path does not exist yet, it will walk up parent directories until one exists, or it hits '/' or '.'. Any other stat errors will cause IsNFS to fail.
func WindowsSubsystemPath ¶ added in v2.2.0
WindowsSubsystemPath is the non-Windows stub for the Windows-only implementation in fsutil_windows.go.
func WindowsSubsystemPathForLinux ¶ added in v2.2.0
WindowsSubsystemPathForLinux is the non-Windows stub for the Windows-only implementation in fsutil_windows.go.
func WindowsSubsystemPathWithCygpath ¶ added in v2.2.0
WindowsSubsystemPathWithCygpath is the non-Windows stub for the Windows-only implementation in fsutil_windows.go.
func WriteFileAtomic ¶ added in v2.3.0
WriteFileAtomic writes data to a temp file in path's directory and renames it onto path, so a reader sees the old file or the whole new one, never a partial write; the rename is atomic on Unix only. os.CreateTemp requests 0600, so the result is 0600 masked by the umask (0600 under a typical umask).
Types ¶
This section is empty.