Documentation ¶
Overview ¶
fsw is a package with simple methods to work with filesystems.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CutBOMFromString ¶
CutBOMFromString returns string with byte order mark removed in case it exists at the start of the string.
Useful for reading UTF-8 files
Types ¶
type IFile ¶
type IFile interface { Chdir() error Chmod(mode fs.FileMode) error Chown(uid int, gid int) error Close() error Fd() uintptr Name() string Read(b []byte) (n int, err error) ReadAt(b []byte, off int64) (n int, err error) ReadDir(n int) ([]fs.DirEntry, error) ReadFrom(r io.Reader) (n int64, err error) Readdir(n int) ([]fs.FileInfo, error) Readdirnames(n int) (names []string, err error) Seek(offset int64, whence int) (ret int64, err error) SetDeadline(t time.Time) error SetReadDeadline(t time.Time) error SetWriteDeadline(t time.Time) error Stat() (fs.FileInfo, error) Sync() error SyscallConn() (syscall.RawConn, error) Truncate(size int64) error Write(b []byte) (n int, err error) WriteAt(b []byte, off int64) (n int, err error) WriteString(s string) (n int, err error) }
IFile represents file in the filesystem
type IFileReader ¶
IFileReader is an interface to mock file reading operations
Click to show internal directories.
Click to hide internal directories.