Documentation ¶
Index ¶
- type FileInterface
- type FileSystem
- type OSFileSystem
- func (OSFileSystem) EvalSymlinks(path string) (string, error)
- func (OSFileSystem) Glob(pattern string) ([]string, error)
- func (OSFileSystem) IsNotExist(err error) bool
- func (OSFileSystem) MkdirAll(path string, perm os.FileMode) error
- func (OSFileSystem) Open(name string) (FileInterface, error)
- func (OSFileSystem) OpenFile(name string, flag int, perm os.FileMode) (FileInterface, error)
- func (OSFileSystem) Remove(path string) error
- func (OSFileSystem) Stat(name string) (fs.FileInfo, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileInterface ¶
type FileSystem ¶
type FileSystem interface { IsNotExist(err error) bool MkdirAll(path string, perm os.FileMode) error Stat(name string) (fs.FileInfo, error) Remove(path string) error OpenFile(name string, flag int, perm os.FileMode) (FileInterface, error) Open(name string) (FileInterface, error) Glob(pattern string) ([]string, error) EvalSymlinks(path string) (string, error) }
FileSystem defines the methods for file system operations.
func NewFileSystem ¶
func NewFileSystem() FileSystem
type OSFileSystem ¶
type OSFileSystem struct{}
OSFileSystem implements FileSystemInterface using the os package.
func (OSFileSystem) EvalSymlinks ¶
func (OSFileSystem) EvalSymlinks(path string) (string, error)
func (OSFileSystem) IsNotExist ¶
func (OSFileSystem) IsNotExist(err error) bool
func (OSFileSystem) Open ¶
func (OSFileSystem) Open(name string) (FileInterface, error)
func (OSFileSystem) OpenFile ¶
func (OSFileSystem) OpenFile(name string, flag int, perm os.FileMode) (FileInterface, error)
func (OSFileSystem) Remove ¶
func (OSFileSystem) Remove(path string) error
Click to show internal directories.
Click to hide internal directories.