Documentation
¶
Overview ¶
Package filesystem owns root-confined production filesystem access.
Index ¶
- type Handle
- func (h *Handle) Chmod(path string, mode fs.FileMode) error
- func (h *Handle) Close() error
- func (h *Handle) Info(path string) (fs.FileInfo, error)
- func (h *Handle) LinkInfo(path string) (fs.FileInfo, error)
- func (h *Handle) MkdirAll(path string, mode fs.FileMode) error
- func (h *Handle) Publish(path string, contents []byte, mode fs.FileMode) error
- func (h *Handle) Read(path string) ([]byte, error)
- func (h *Handle) ReadWithMode(path string) ([]byte, fs.FileMode, error)
- func (h *Handle) Remove(path string) error
- func (h *Handle) Replace(destination string, contents []byte, mode fs.FileMode) (returnErr error)
- func (h *Handle) Walk(subtree string, visit func(path string, info fs.FileInfo) (bool, error)) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handle ¶
type Handle struct {
// contains filtered or unexported fields
}
Handle provides root-confined filesystem operations.
func (*Handle) Chmod ¶ added in v0.35.1
Chmod changes path's permission mode beneath the selected root.
func (*Handle) LinkInfo ¶
LinkInfo returns metadata for path without following a final symbolic link.
func (*Handle) MkdirAll ¶ added in v0.34.0
MkdirAll creates path and missing parents beneath the selected root.
func (*Handle) Publish ¶ added in v0.34.0
Publish atomically publishes one complete file without replacement beneath the selected root.
func (*Handle) ReadWithMode ¶ added in v0.35.1
ReadWithMode reads path and returns its permission mode from one confined open.
Click to show internal directories.
Click to hide internal directories.