Versions in this module Expand all Collapse all v0 v0.1.0 Mar 18, 2026 Changes in this version + var ErrReadOnlyEmbedFS = errors.New("embed filesystem is read-only") + var ErrUnimplementedForEmbedFS = errors.New("operation unimplemented for embed filesystem") + func ComputeFileHash(fs opctx.FS, hashType HashType, filePath string) (string, error) + func CopyDirRecursive(dryRunnable opctx.DryRunnable, fs opctx.FS, sourceDirPath, destDirPath string, ...) (err error) + func CopyDirRecursiveCrossFS(dryRunnable opctx.DryRunnable, sourceFS opctx.FS, sourceDirPath string, ...) (err error) + func CopyFile(dryRunnable opctx.DryRunnable, fs opctx.FS, sourcePath, destPath string, ...) error + func CopyFileCrossFS(dryRunnable opctx.DryRunnable, sourceFS opctx.FS, sourcePath string, ...) (err error) + func DirExists(fs opctx.FS, path string) (bool, error) + func Exists(fs opctx.FS, path string) (bool, error) + func Glob(fs opctx.FS, pattern string, opts ...doublestar.GlobOption) ([]string, error) + func IsDirEmpty(fs opctx.FS, path string) (bool, error) + func MkdirAll(fs opctx.FS, path string) error + func MkdirTemp(fs opctx.FS, dir, pattern string) (string, error) + func MkdirTempInTempDir(fs opctx.FS, pattern string) (string, error) + func ReadDir(fs opctx.FS, name string) (entries []os.FileInfo, err error) + func ReadFile(fs opctx.FS, filename string) ([]byte, error) + func RemoveAllAndUpdateErrorIfNil(fs opctx.FS, path string, errorToUpdate *error) + func SkipExistingFiles(destFS opctx.FS, destPath string) (bool, error) + func SymLinkOrCopy(dryRunnable opctx.DryRunnable, fs opctx.FS, sourcePath, destPath string, ...) error + func ValidateFileHash(dryRunnable opctx.DryRunnable, fs opctx.FS, hashType HashType, filePath string, ...) error + func ValidateFilename(filename string) error + func WrapEmbedFS(embedFS *embed.FS) opctx.FS + func WriteFile(fs opctx.FS, path string, data []byte, perm os.FileMode) error + type CopyDirOptions struct + FileFilter func(destFS opctx.FS, destPath string) (bool, error) + type CopyFileOptions struct + PreserveFileMode bool + type FileUpdateWriter struct + func NewFileUpdateWriter(fs opctx.FS, destFilePath string) (result *FileUpdateWriter, err error) + func (a *FileUpdateWriter) Commit() (err error) + func (a *FileUpdateWriter) Write(p []byte) (n int, err error) + type HashType string + const HashTypeMD5 + const HashTypeSHA256 + const HashTypeSHA512