Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
Error is the common error type used by vfs implementations.
func (*Error) Cause ¶
Cause returns the causing error, is there is one. Returns nil if the error is the root cause of an error.
func (*Error) Errors ¶
Errors returns the error cause as a list. The Errors method is avaialble for compatiblity with other error packages and libraries consuming errors (e.g. zap or multierr).
type File ¶
type File interface { io.Closer io.WriterAt io.ReaderAt Name() string Size() (int64, error) Truncate(int64) error Lock(exclusive, blocking bool) error Unlock() error MMap(sz int) ([]byte, error) MUnmap([]byte) error // If a write/flush fails due to IO errors or the disk running out of space, // the kernel internally marks the error on the 'page'. Fsync will finally // return the error, but reset the error on failed writes. Subsequent fsync // operations will not report errors for former failed pages, even if the // pages are not written again. Therefore, if fsync fails, we must assume all // write operations - since the last successfull fsync - have failed and // reinitiate all writes. // According to [1] Linux, OpenBSD, and NetBSD are known to silently clear // errors on fsync fail. // // [1]: https://lwn.net/Articles/752098/ Sync(flags SyncFlag) error }
type Kind ¶
type Kind int
Kind encodes an error code for use by applications. Implementations of vfs must unify errors, using the Error type and the error codes defined here.
const ( ErrOSOther Kind = iota // unknown OS error ErrPermission // permission denied ErrExist // file already exists ErrNotExist // file does not exist ErrClosed // file already closed ErrNoSpace // no space or quota exhausted ErrFDLimit // process file desciptor limit reached ErrResolvePath // cannot resolve path ErrIO // read/write IO error ErrNotSupported // operation not supported ErrLockFailed // file lock failed ErrUnlockFailed // file unlock failed )
Click to show internal directories.
Click to hide internal directories.