Documentation
¶
Overview ¶
Package file offers filesystem utils geared towards idempotent operations.
Index ¶
- func Chown(ctx context.Context, path string, username string, group string) (err error)
- func EnsureConfigFromExample(rootPath, configPath string) error
- func EnsureSymlink(ctx context.Context, source, target string) (err error)
- func EnsureSymlinkAbsent(ctx context.Context, target string) (err error)
- type Directories
- type Directory
- type Path
- type Paths
- type Permission
- type Permissions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Chown ¶ added in v0.73.2
Chown changes the ownership of a file to the specified owner and group.
func EnsureConfigFromExample ¶ added in v0.84.3
EnsureConfigFromExample initializes a missing config from a `.example` template file. Existing files, including symlinks, are left untouched.
func EnsureSymlink ¶
EnsureSymlink ensures that the symlink is created.
Types ¶
type Permission ¶
Permission represents the desired ownership and mode of a file.