Documentation ¶
Overview ¶
Package filesystem - Content managed by Project Forge, see [projectforge.md] for details.
Package filesystem - Content managed by Project Forge, see [projectforge.md] for details.
Package filesystem - Content managed by Project Forge, see [projectforge.md] for details.
Package filesystem - Content managed by Project Forge, see [projectforge.md] for details.
Package filesystem - Content managed by Project Forge, see [projectforge.md] for details.
Package filesystem - Content managed by Project Forge, see [projectforge.md] for details.
Package filesystem - Content managed by Project Forge, see [projectforge.md] for details.
Package filesystem - Content managed by Project Forge, see [projectforge.md] for details.
Package filesystem - Content managed by Project Forge, see [projectforge.md] for details.
Package filesystem - Content managed by Project Forge, see [projectforge.md] for details.
Package filesystem - Content managed by Project Forge, see [projectforge.md] for details.
Package filesystem - Content managed by Project Forge, see [projectforge.md] for details.
Package filesystem - Content managed by Project Forge, see [projectforge.md] for details.
Package filesystem - Content managed by Project Forge, see [projectforge.md] for details.
Index ¶
- Variables
- func ExifExtract(b []byte) (util.ValueMap, error)
- func ImageType(path ...string) string
- func MemFS() afero.Fs
- func OSFS() afero.Fs
- type FileInfo
- type FileInfos
- type FileLoader
- type FileMode
- type FileSystem
- func (f *FileSystem) Clone() FileLoader
- func (f *FileSystem) CopyFile(src string, tgt string) error
- func (f *FileSystem) CopyRecursive(src string, tgt string, ignore []string, logger util.Logger) error
- func (f *FileSystem) CreateDirectory(path string) error
- func (f *FileSystem) Download(ctx context.Context, url string, path string, overwrite bool, _ util.Logger) (int, error)
- func (f *FileSystem) Exists(path string) bool
- func (f *FileSystem) FileReader(fn string) (Reader, error)
- func (f *FileSystem) FileWriter(fn string, createIfNeeded bool, appendMode bool) (Writer, error)
- func (f *FileSystem) IsDir(path string) bool
- func (f *FileSystem) ListDirectories(path string, ign []string, logger util.Logger) []string
- func (f *FileSystem) ListExtension(path string, ext string, ign []string, trimExtension bool, logger util.Logger) []string
- func (f *FileSystem) ListFiles(path string, ign []string, logger util.Logger) FileInfos
- func (f *FileSystem) ListFilesRecursive(path string, ign []string, _ util.Logger) ([]string, error)
- func (f *FileSystem) ListJSON(path string, ign []string, trimExtension bool, logger util.Logger) []string
- func (f *FileSystem) ListTree(cfg util.ValueMap, pth string, ign []string, logger util.Logger, ...) (*Tree, error)
- func (f *FileSystem) Move(src string, tgt string) error
- func (f *FileSystem) PeekFile(path string, maxSize int) ([]byte, error)
- func (f *FileSystem) ReadFile(path string) ([]byte, error)
- func (f *FileSystem) Remove(path string, logger util.Logger) error
- func (f *FileSystem) RemoveRecursive(path string, logger util.Logger) error
- func (f *FileSystem) Root() string
- func (f *FileSystem) SetMode(path string, mode FileMode) error
- func (f *FileSystem) Size(path string) int
- func (f *FileSystem) Stat(path string) (*FileInfo, error)
- func (f *FileSystem) String() string
- func (f *FileSystem) UnzipToDir(src string, dest string) (*util.OrderedMap[int64], error)
- func (f *FileSystem) Walk(path string, ign []string, fn func(fp string, info *FileInfo, err error) error) error
- func (f *FileSystem) WriteFile(path string, content []byte, mode FileMode, overwrite bool) error
- type Node
- type Nodes
- type Reader
- type Tree
- type Writer
Constants ¶
This section is empty.
Variables ¶
var ( DirectoryMode = FileMode(0o755) DefaultMode = FileMode(0o644) )
Functions ¶
Types ¶
type FileInfo ¶ added in v0.11.17
func FileInfoFromDE ¶ added in v0.11.17
func FileInfoFromFS ¶ added in v0.11.17
type FileInfos ¶ added in v0.11.17
type FileInfos []*FileInfo
func FileInfosFromFS ¶ added in v0.11.17
type FileLoader ¶
type FileLoader interface { Root() string Clone() FileLoader PeekFile(path string, maxSize int) ([]byte, error) Size(path string) int ReadFile(path string) ([]byte, error) FileReader(fn string) (Reader, error) CreateDirectory(path string) error WriteFile(path string, content []byte, mode FileMode, overwrite bool) error FileWriter(fn string, createIfNeeded bool, appendMode bool) (Writer, error) CopyFile(src string, tgt string) error CopyRecursive(src string, tgt string, ignore []string, logger util.Logger) error Move(src string, tgt string) error ListFiles(path string, ignore []string, logger util.Logger) FileInfos ListFilesRecursive(path string, ignore []string, logger util.Logger) ([]string, error) ListTree(cfg util.ValueMap, path string, ignore []string, logger util.Logger, tags ...string) (*Tree, error) ListJSON(path string, ignore []string, trimExtension bool, logger util.Logger) []string ListExtension(path string, ext string, ignore []string, trimExtension bool, logger util.Logger) []string ListDirectories(path string, ignore []string, logger util.Logger) []string Walk(path string, ign []string, fn func(fp string, info *FileInfo, err error) error) error Stat(path string) (*FileInfo, error) SetMode(path string, mode FileMode) error Exists(path string) bool IsDir(path string) bool Remove(path string, logger util.Logger) error RemoveRecursive(pt string, logger util.Logger) error Download(ctx context.Context, url string, path string, overwrite bool, logger util.Logger) (int, error) UnzipToDir(src string, dest string) (*util.OrderedMap[int64], error) String() string }
type FileSystem ¶
type FileSystem struct { Mode string `json:"mode,omitempty"` ReadOnly bool `json:"readOnly,omitempty"` // contains filtered or unexported fields }
func NewFileSystem ¶
func NewFileSystem(root string, readonly bool, mode string) (*FileSystem, error)
func (*FileSystem) Clone ¶
func (f *FileSystem) Clone() FileLoader
func (*FileSystem) CopyRecursive ¶
func (*FileSystem) CreateDirectory ¶
func (f *FileSystem) CreateDirectory(path string) error
func (*FileSystem) Exists ¶
func (f *FileSystem) Exists(path string) bool
func (*FileSystem) FileReader ¶ added in v1.0.3
func (f *FileSystem) FileReader(fn string) (Reader, error)
func (*FileSystem) FileWriter ¶ added in v1.0.3
func (*FileSystem) IsDir ¶
func (f *FileSystem) IsDir(path string) bool
func (*FileSystem) ListDirectories ¶
func (*FileSystem) ListExtension ¶
func (*FileSystem) ListFilesRecursive ¶
func (*FileSystem) PeekFile ¶
func (f *FileSystem) PeekFile(path string, maxSize int) ([]byte, error)
func (*FileSystem) RemoveRecursive ¶
func (f *FileSystem) RemoveRecursive(path string, logger util.Logger) error
func (*FileSystem) Root ¶
func (f *FileSystem) Root() string
func (*FileSystem) SetMode ¶ added in v0.2.27
func (f *FileSystem) SetMode(path string, mode FileMode) error
func (*FileSystem) Size ¶ added in v0.11.7
func (f *FileSystem) Size(path string) int
func (*FileSystem) String ¶ added in v0.11.17
func (f *FileSystem) String() string
func (*FileSystem) UnzipToDir ¶ added in v1.0.12
func (f *FileSystem) UnzipToDir(src string, dest string) (*util.OrderedMap[int64], error)