Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func WithFileSystem ¶
func WithFileSystem(ctx context.Context, fs FileSystem) context.Context
WithFileSystem adds FileSystem to context.
Types ¶
type Directories ¶
type Directories interface {
Mkdir(path string, perm fs.FileMode) error
MkdirAll(path string, perm fs.FileMode) error
}
func DirectoriesFrom ¶
func DirectoriesFrom(ctx context.Context) (Directories, error)
DirectoriesFrom gets Directories from context.
type FileSystem ¶
FileSystem combines file reading, directory operations, writing, removal, and lifecycle management. The caller owns every FileSystem returned by New and must close it when it is no longer needed.
func FileSystemFrom ¶
func FileSystemFrom(ctx context.Context) (FileSystem, error)
FileSystemFrom gets FileSystem from context.
func New ¶
func New(setters ...Option) (FileSystem, error)
New creates a filesystem from the provided options. The caller owns the returned filesystem and must close it when it is no longer needed.
type Option ¶
func WithReadOnly ¶
type ReadableFile ¶
type Reader ¶
type WritableFile ¶
type WritableFile interface {
ReadableFile
io.Writer
io.Seeker
}
Click to show internal directories.
Click to hide internal directories.