Documentation
¶
Index ¶
Constants ¶
View Source
const ( ModeDir = gofs.ModeDir ModePerm = gofs.ModePerm )
View Source
const ( O_RDONLY = FileOpenFlag(os.O_RDONLY) O_WRONLY = FileOpenFlag(os.O_WRONLY) O_RDWR = FileOpenFlag(os.O_RDWR) O_CREATE = FileOpenFlag(os.O_CREATE) )
Variables ¶
View Source
var ( ErrInvalid = gofs.ErrInvalid // "invalid argument" ErrPermission = gofs.ErrPermission // "permission denied" ErrExist = gofs.ErrExist // "file already exists" ErrNotExist = gofs.ErrNotExist // "file does not exist" ErrClosed = gofs.ErrClosed // "file already closed" )
Functions ¶
Types ¶
type FS ¶
type FS interface { io.Closer gofs.FS gofs.ReadDirFS gofs.StatFS // OpenFile opens a file using the given flags. // By passing O_RDWR, the file can be opened for writing. OpenFile(path string, flag FileOpenFlag) (File, error) // MkdirAll creates a directory named path, along with any necessary parents. MkdirAll(path string) error // RemoveAll removes path and any children it contains. RemoveAll(path string) error // Rename renames (moves) oldpath to newpath. Rename(oldPath, newPath string) error }
FS is the interface implemented by a writeable file system.
type File ¶
type File interface { FileReadOnly io.Writer io.Seeker io.ReaderAt io.WriterAt Sync() error Truncate(size int64) error }
File is the interface implemented by a writeable file.
type FileOpenFlag ¶ added in v0.6.0
type FileOpenFlag int
FileOpenFlag allows configuring how a file is opened.
type FileReadOnly ¶ added in v0.6.0
FileReadOnly is the interface implemented by a read-only file. This is kept for compatibility with io/fs.
Click to show internal directories.
Click to hide internal directories.