Documentation
¶
Overview ¶
Package local provides primitive resources backed by the local filesystem.
Index ¶
- func Library() *runtime.Library
- type File
- func (f *File) Create(_ context.Context, _ any) (*FileOutput, error)
- func (f *File) Delete(_ context.Context, _ any, _ *FileOutput) error
- func (f *File) Read(_ context.Context, _ any, _ *FileOutput) (*FileOutput, error)
- func (f *File) ReplaceFields() []string
- func (f *File) SchemaVersion() int
- func (f *File) Update(_ context.Context, _ any, _ runtime.Prior[File, *FileOutput]) (*FileOutput, error)
- type FileOutput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type File ¶
File writes a regular file to the local filesystem. The file's path is part of the input set; changing the path replaces the resource (the prior file is deleted and a new one is written at the new path). CreateDirectory opts the resource into creating any missing parent directories of Path. Without it, a missing parent is an error so callers do not accidentally write outside an expected tree.
func (*File) Read ¶
func (f *File) Read(_ context.Context, _ any, _ *FileOutput) (*FileOutput, error)
func (*File) ReplaceFields ¶
func (*File) SchemaVersion ¶
type FileOutput ¶
FileOutput is what gets stored in state after Create / Update. It holds only what writing the file computes; path is an input and is readable as one, so it is not copied here.
Click to show internal directories.
Click to hide internal directories.