Documentation
¶
Index ¶
- func Chown(path string, userName string) error
- func ChownR(path string, userName string) error
- func CreateIfNotExists(dir string, perm os.FileMode) error
- func DeniedByFilesystem(err error) bool
- func Directory(scrDir, dest string) error
- func Exists(filePath string) bool
- func File(srcFile, dstFile string, perm os.FileMode) error
- func IsUID(info os.FileInfo, uid uint32) bool
- func Lchown(info os.FileInfo, sourcePath, destPath string) error
- func MkdirAllChown(path string, perm os.FileMode, userName string) error
- func RenameDirectory(srcDir, dest string) error
- func Symlink(source, dest string) error
- func Unsupported(error) bool
- type ChownFailure
- type ChownFailures
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeniedByFilesystem ¶ added in v1.17.0
DeniedByFilesystem reports whether err means the filesystem refused the reassignment (insufficient privilege or a read-only share).
func MkdirAllChown ¶ added in v1.11.0
func RenameDirectory ¶
func Unsupported ¶ added in v1.17.0
Unsupported reports whether err means chown itself is not a meaningful operation on this platform (Windows only). On unix, chown is always a real operation, so any failure here is a genuine denial, never this.
Types ¶
type ChownFailure ¶ added in v1.17.0
ChownFailure is one entry a recursive chown could not reassign.
func (ChownFailure) Error ¶ added in v1.17.0
func (f ChownFailure) Error() string
func (ChownFailure) Unwrap ¶ added in v1.17.0
func (f ChownFailure) Unwrap() error
type ChownFailures ¶ added in v1.17.0
type ChownFailures []ChownFailure
ChownFailures aggregates the entries ChownR could not chown.
func (ChownFailures) AllDenied ¶ added in v1.17.0
func (fs ChownFailures) AllDenied() bool
AllDenied reports whether every failure was refused by the filesystem (permission denied or read-only share); the expected case for entries on virtiofs shares such as read-only .git pack files.
func (ChownFailures) Error ¶ added in v1.17.0
func (fs ChownFailures) Error() string
func (ChownFailures) Unwrap ¶ added in v1.17.0
func (fs ChownFailures) Unwrap() []error