Documentation ¶
Index ¶
- func CopyFile(dst WriteFS, dstFile string, src fs.FS, srcFile string) error
- func CopyTo(ctx context.Context, dst WriteFS, dstBasePath string, src fs.FS) error
- func TotalSize(ctx context.Context, fsys fs.FS) (uint64, error)
- func VisitFiles(ctx context.Context, fsys fs.FS, ...) error
- func WalkDir(fsys fs.FS, dir string, callback func(string, fs.DirEntry) error) error
- func WalkDirWithMatcher(fsys fs.FS, dir string, matcher *PatternMatcher, ...) error
- func WriteByteStream(ctx context.Context, fs WriteFS, path string, contents bytestream.ByteStream, ...) error
- func WriteFSToWorkspace(ctx context.Context, log io.Writer, vfs ReadWriteFS, src fs.FS) error
- func WriteFile(ctx context.Context, fs WriteFS, path string, contents []byte, ...) error
- func WriteFileExtended(ctx context.Context, dst ReadWriteFS, filePath string, mode fs.FileMode, ...) error
- func WriteWorkspaceFile(ctx context.Context, log io.Writer, vfs ReadWriteFS, filePath string, ...) error
- type ChmodFS
- type File
- type HasMatch
- type LocalFS
- type LocalOpt
- type Location
- type MatcherOpts
- type MkdirFS
- type PatternMatcher
- type ReadWriteFS
- type RmdirFS
- type TotalSizeFS
- type VisitFS
- type WriteFS
- type WriteFileExtendedOpts
- type WriteFileHandle
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func VisitFiles ¶
func WalkDirWithMatcher ¶
func WriteByteStream ¶
func WriteByteStream(ctx context.Context, fs WriteFS, path string, contents bytestream.ByteStream, mode fs.FileMode) error
func WriteFSToWorkspace ¶
func WriteFileExtended ¶
Types ¶
type LocalFS ¶
func ReadWriteLocalFS ¶
type LocalOpt ¶
type LocalOpt interface {
// contains filtered or unexported methods
}
func AnnounceWrites ¶
type Location ¶
type Location struct { ModuleName string // FS rooted at the module [ModuleName] root. FS fs.FS // Path within the module (within [FS]). RelPath string }
Identifies a package/file within a module.
func ResolveLocation ¶
func (Location) AsPackageName ¶
func (loc Location) AsPackageName() schema.PackageName
func (Location) ErrorLocation ¶
Implements the fnerrors.Location interface.
type MatcherOpts ¶
type PatternMatcher ¶
type PatternMatcher struct {
// contains filtered or unexported fields
}
func NewMatcher ¶
func NewMatcher(opts MatcherOpts) (*PatternMatcher, error)
func (*PatternMatcher) Excludes ¶
func (m *PatternMatcher) Excludes(name string) bool
func (*PatternMatcher) Includes ¶
func (m *PatternMatcher) Includes(name string) bool
type ReadWriteFS ¶
type VisitFS ¶
type VisitFS interface {
VisitFiles(context.Context, func(string, bytestream.ByteStream, fs.DirEntry) error) error
}
type WriteFileExtendedOpts ¶
type WriteFileHandle ¶
type WriteFileHandle interface { io.WriteCloser }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.