Documentation
¶
Index ¶
- type Directory
- func (d *Directory) EnsureParentDirs() bool
- func (f *Directory) Group() interface{}
- func (f *Directory) Mode() *os.FileMode
- func (f *Directory) Path() string
- func (d *Directory) UnmarshalJSON(data []byte) error
- func (d *Directory) UnmarshalYAML(unmarshal func(any) error) error
- func (f *Directory) User() interface{}
- type File
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Directory ¶
type Directory struct {
// contains filtered or unexported fields
}
func NewDirectory ¶
func NewDirectory(path string, mode *os.FileMode, user interface{}, group interface{}, ensureParentDirs bool) (*Directory, error)
NewDirectory creates a new directory with the given path, mode, user and group. user and group can be either a string (user name/group name), an int64 (UID/GID) or nil.
func (*Directory) EnsureParentDirs ¶
func (*Directory) Group ¶
func (f *Directory) Group() interface{}
Group can return either a string (group name) or an int64 (GID)
func (*Directory) UnmarshalJSON ¶ added in v0.40.2
func (*Directory) UnmarshalYAML ¶ added in v0.40.2
type File ¶
type File struct {
// contains filtered or unexported fields
}
func NewFile ¶
func NewFile(path string, mode *os.FileMode, user interface{}, group interface{}, data []byte) (*File, error)
NewFile creates a new file with the given path, data, mode, user and group. user and group can be either a string (user name/group name), an int64 (UID/GID) or nil.
func NewFileForURI ¶ added in v0.40.2
func NewFileForURI(targetPath string, mode *os.FileMode, user interface{}, group interface{}, uriStr string) (*File, error)
NewFleForURI creates a new file from the given "URI" (currently only local file are supported).
func (*File) Group ¶
func (f *File) Group() interface{}
Group can return either a string (group name) or an int64 (GID)
func (*File) UnmarshalJSON ¶ added in v0.40.2
func (*File) UnmarshalYAML ¶ added in v0.40.2
Click to show internal directories.
Click to hide internal directories.