-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy patherrors.go
More file actions
26 lines (19 loc) · 1009 Bytes
/
errors.go
File metadata and controls
26 lines (19 loc) · 1009 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package vfs
// Error is a type that allows for error constants below
type Error string
// Error returns a string representation of the error
func (e Error) Error() string { return string(e) }
const (
// ErrCopyToNotPossible - CopyTo/MoveTo operations are only possible when seek position is 0,0
ErrCopyToNotPossible = Error("current cursor offset is not 0 as required for this operation")
// CopyToNotPossible - CopyTo/MoveTo operations are only possible when seek position is 0,0
//
// Deprecated: Use ErrCopyToNotPossible instead
CopyToNotPossible = ErrCopyToNotPossible //nolint:errname
// ErrNotExist - File does not exist
ErrNotExist = Error("file does not exist")
// ErrSeekInvalidOffset - Offset is invalid. Must be greater than or equal to 0
ErrSeekInvalidOffset = Error("seek: invalid offset")
// ErrSeekInvalidWhence - Whence is invalid. Must be one of the following: 0 (io.SeekStart), 1 (io.SeekCurrent), or 2 (io.SeekEnd)
ErrSeekInvalidWhence = Error("seek: invalid whence")
)