Documentation
¶
Index ¶
- Constants
- func Abs(fSys FS, path string) (string, error)
- func DirSize(fSys FS, path string) (int64, error)
- func ExpandTilde(fs FS, path string) (string, error)
- func Ext(filename string) string
- func FirstDir(fSys FS, dir string) (string, error)
- func IsExists(fSys FS, path string) bool
- func ReadJson[T any](ctx context.Context, fs FS, path string) (*T, error)
- func ReadOrCreateJson[T any](ctx context.Context, fs FS, path string, defaultVal T) (*T, error)
- func SetExecutable(fSys FS, path string) error
- func WriteJson(ctx context.Context, fs FS, in any, path string) error
- type FS
- type MemFS
- func (m *MemFS) GetCurrentDir() string
- func (m *MemFS) GetHomeDir() (string, error)
- func (m *MemFS) GetTree(dir string) ([]string, error)
- func (m *MemFS) Lock(_ context.Context, _ string) (func(), error)
- func (m *MemFS) RLock(_ context.Context, _ string) (func(), error)
- func (m *MemFS) SymlinkIfPossible(oldname, newname string) error
- func (m *MemFS) Walk(root string, fn filepath.WalkFunc) error
- type RealFs
- func (r *RealFs) Chmod(name string, mode os.FileMode) error
- func (r *RealFs) Chown(name string, uid, gid int) error
- func (r *RealFs) Chtimes(name string, atime time.Time, mtime time.Time) error
- func (r *RealFs) Create(name string) (afero.File, error)
- func (r *RealFs) GetCurrentDir() string
- func (r *RealFs) GetHomeDir() (string, error)
- func (r *RealFs) Lock(ctx context.Context, filename string) (func(), error)
- func (r *RealFs) Mkdir(name string, perm os.FileMode) error
- func (r *RealFs) MkdirAll(path string, perm os.FileMode) error
- func (r *RealFs) Name() string
- func (r *RealFs) Open(name string) (afero.File, error)
- func (r *RealFs) OpenFile(name string, flag int, perm os.FileMode) (afero.File, error)
- func (r *RealFs) RLock(ctx context.Context, filename string) (func(), error)
- func (r *RealFs) Remove(name string) error
- func (r *RealFs) RemoveAll(path string) error
- func (r *RealFs) Rename(oldname, newname string) error
- func (r *RealFs) Stat(name string) (os.FileInfo, error)
- func (r *RealFs) SymlinkIfPossible(oldname, newname string) error
- func (r *RealFs) Walk(root string, fn filepath.WalkFunc) error
Constants ¶
View Source
const DefaultDirPerm = 0o755
Variables ¶
This section is empty.
Functions ¶
func ReadOrCreateJson ¶
func SetExecutable ¶ added in v0.37.0
SetExecutable mark file as executable.
Types ¶
type FS ¶
type MemFS ¶
func (*MemFS) GetCurrentDir ¶ added in v0.29.0
func (*MemFS) GetHomeDir ¶ added in v0.29.0
func (*MemFS) SymlinkIfPossible ¶
type RealFs ¶ added in v0.29.0
type RealFs struct {
// contains filtered or unexported fields
}
func (*RealFs) GetCurrentDir ¶ added in v0.29.0
func (*RealFs) GetHomeDir ¶ added in v0.29.0
func (*RealFs) SymlinkIfPossible ¶ added in v0.29.0
Click to show internal directories.
Click to hide internal directories.