fsutil

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 19, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(path string) (*os.File, error)

func CreateWithMode

func CreateWithMode(path string, mode os.FileMode) (*os.File, error)

func Open

func Open(path string) (*os.File, error)

func OpenFile

func OpenFile(path string, flag int, mode os.FileMode) (*os.File, error)

func ReadDirUnder

func ReadDirUnder(root string, segments ...string) ([]os.DirEntry, string, error)

func ReadFile

func ReadFile(path string) ([]byte, error)

func ReadFileUnder

func ReadFileUnder(root string, segments ...string) ([]byte, string, error)

func ResolveUnder

func ResolveUnder(root string, segments ...string) (string, error)

func StatUnder

func StatUnder(root string, segments ...string) (os.FileInfo, string, error)

Types

type BundleRoot

type BundleRoot struct {
	// contains filtered or unexported fields
}

func NewBundleRoot

func NewBundleRoot(path string) (BundleRoot, error)

func (BundleRoot) Abs

func (r BundleRoot) Abs() string

func (BundleRoot) Create

func (r BundleRoot) Create(segments ...string) (*os.File, string, error)

func (BundleRoot) Open

func (r BundleRoot) Open(segments ...string) (*os.File, string, error)

func (BundleRoot) OpenFile

func (r BundleRoot) OpenFile(flag int, mode os.FileMode, segments ...string) (*os.File, string, error)

func (BundleRoot) ReadDir

func (r BundleRoot) ReadDir(segments ...string) ([]os.DirEntry, string, error)

func (BundleRoot) ReadFile

func (r BundleRoot) ReadFile(segments ...string) ([]byte, string, error)

func (BundleRoot) Resolve

func (r BundleRoot) Resolve(segments ...string) (string, error)

func (BundleRoot) Stat

func (r BundleRoot) Stat(segments ...string) (os.FileInfo, string, error)

func (BundleRoot) WalkDir

func (r BundleRoot) WalkDir(fn fs.WalkDirFunc, segments ...string) error

func (BundleRoot) WalkFiles

func (r BundleRoot) WalkFiles(fn func(path string, d os.DirEntry) error, segments ...string) error

type PreparedRoot

type PreparedRoot struct {
	// contains filtered or unexported fields
}

func NewPreparedRoot

func NewPreparedRoot(path string) (PreparedRoot, error)

func (PreparedRoot) Abs

func (r PreparedRoot) Abs() string

func (PreparedRoot) Create

func (r PreparedRoot) Create(segments ...string) (*os.File, string, error)

func (PreparedRoot) Open

func (r PreparedRoot) Open(segments ...string) (*os.File, string, error)

func (PreparedRoot) OpenFile

func (r PreparedRoot) OpenFile(flag int, mode os.FileMode, segments ...string) (*os.File, string, error)

func (PreparedRoot) ReadDir

func (r PreparedRoot) ReadDir(segments ...string) ([]os.DirEntry, string, error)

func (PreparedRoot) ReadFile

func (r PreparedRoot) ReadFile(segments ...string) ([]byte, string, error)

func (PreparedRoot) Resolve

func (r PreparedRoot) Resolve(segments ...string) (string, error)

func (PreparedRoot) Stat

func (r PreparedRoot) Stat(segments ...string) (os.FileInfo, string, error)

func (PreparedRoot) WalkDir

func (r PreparedRoot) WalkDir(fn fs.WalkDirFunc, segments ...string) error

func (PreparedRoot) WalkFiles

func (r PreparedRoot) WalkFiles(fn func(path string, d os.DirEntry) error, segments ...string) error

type Root

type Root struct {
	// contains filtered or unexported fields
}

func NewRoot

func NewRoot(path string) (Root, error)

func (Root) Abs

func (r Root) Abs() string

func (Root) Create

func (r Root) Create(segments ...string) (*os.File, string, error)

func (Root) Open

func (r Root) Open(segments ...string) (*os.File, string, error)

func (Root) OpenFile

func (r Root) OpenFile(flag int, mode os.FileMode, segments ...string) (*os.File, string, error)

func (Root) ReadDir

func (r Root) ReadDir(segments ...string) ([]os.DirEntry, string, error)

func (Root) ReadFile

func (r Root) ReadFile(segments ...string) ([]byte, string, error)

func (Root) Resolve

func (r Root) Resolve(segments ...string) (string, error)

func (Root) Stat

func (r Root) Stat(segments ...string) (os.FileInfo, string, error)

func (Root) WalkDir

func (r Root) WalkDir(fn fs.WalkDirFunc, segments ...string) error

func (Root) WalkDirWithContext

func (r Root) WalkDirWithContext(ctx context.Context, fn fs.WalkDirFunc, segments ...string) error

func (Root) WalkFiles

func (r Root) WalkFiles(fn func(path string, d os.DirEntry) error, segments ...string) error

func (Root) WalkFilesWithContext

func (r Root) WalkFilesWithContext(ctx context.Context, fn func(path string, d os.DirEntry) error, segments ...string) error

type SiteRoot

type SiteRoot struct {
	// contains filtered or unexported fields
}

func NewSiteRoot

func NewSiteRoot(path string) (SiteRoot, error)

func (SiteRoot) Abs

func (r SiteRoot) Abs() string

func (SiteRoot) Create

func (r SiteRoot) Create(segments ...string) (*os.File, string, error)

func (SiteRoot) Open

func (r SiteRoot) Open(segments ...string) (*os.File, string, error)

func (SiteRoot) OpenFile

func (r SiteRoot) OpenFile(flag int, mode os.FileMode, segments ...string) (*os.File, string, error)

func (SiteRoot) ReadDir

func (r SiteRoot) ReadDir(segments ...string) ([]os.DirEntry, string, error)

func (SiteRoot) ReadFile

func (r SiteRoot) ReadFile(segments ...string) ([]byte, string, error)

func (SiteRoot) Resolve

func (r SiteRoot) Resolve(segments ...string) (string, error)

func (SiteRoot) Stat

func (r SiteRoot) Stat(segments ...string) (os.FileInfo, string, error)

func (SiteRoot) WalkDir

func (r SiteRoot) WalkDir(fn fs.WalkDirFunc, segments ...string) error

func (SiteRoot) WalkFiles

func (r SiteRoot) WalkFiles(fn func(path string, d os.DirEntry) error, segments ...string) error

type StateRoot

type StateRoot struct {
	// contains filtered or unexported fields
}

func NewStateRoot

func NewStateRoot(path string) (StateRoot, error)

func (StateRoot) Abs

func (r StateRoot) Abs() string

func (StateRoot) Create

func (r StateRoot) Create(segments ...string) (*os.File, string, error)

func (StateRoot) Open

func (r StateRoot) Open(segments ...string) (*os.File, string, error)

func (StateRoot) OpenFile

func (r StateRoot) OpenFile(flag int, mode os.FileMode, segments ...string) (*os.File, string, error)

func (StateRoot) ReadDir

func (r StateRoot) ReadDir(segments ...string) ([]os.DirEntry, string, error)

func (StateRoot) ReadFile

func (r StateRoot) ReadFile(segments ...string) ([]byte, string, error)

func (StateRoot) Resolve

func (r StateRoot) Resolve(segments ...string) (string, error)

func (StateRoot) Stat

func (r StateRoot) Stat(segments ...string) (os.FileInfo, string, error)

func (StateRoot) WalkDir

func (r StateRoot) WalkDir(fn fs.WalkDirFunc, segments ...string) error

func (StateRoot) WalkFiles

func (r StateRoot) WalkFiles(fn func(path string, d os.DirEntry) error, segments ...string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL