github.com/cozy/cozy-stack@v0.0.0-20240603063001-31110fa4cae1/model/vfs/errors.go (about) 1 package vfs 2 3 import "errors" 4 5 var ( 6 // ErrParentDoesNotExist is used when the parent directory does not 7 // exist 8 ErrParentDoesNotExist = errors.New("Parent directory with given DirID does not exist") 9 // ErrForbiddenDocMove is used when trying to move a document in an 10 // illicit destination 11 ErrForbiddenDocMove = errors.New("Forbidden document move") 12 // ErrIllegalFilename is used when the given filename is not allowed 13 ErrIllegalFilename = errors.New("Invalid filename: empty or contains an illegal character") 14 // ErrIllegalPath is used when the path has too many levels 15 ErrIllegalPath = errors.New("Invalid path: too many levels") 16 // ErrIllegalMime is used when the mime-type of a file is invalid 17 ErrIllegalMime = errors.New("Invalid Content-Type") 18 // ErrIllegalTime is used when a time given (creation or 19 // modification) is not allowed 20 ErrIllegalTime = errors.New("Invalid time given") 21 // ErrInvalidHash is used when the given hash does not match the 22 // calculated one 23 ErrInvalidHash = errors.New("Invalid hash") 24 // ErrContentLengthMismatch is used when the content-length does not 25 // match the calculated one 26 ErrContentLengthMismatch = errors.New("Content length does not match") 27 // ErrConflict is used when the access to a file or directory is in 28 // conflict with another 29 ErrConflict = errors.New("Conflict access to same file or directory") 30 // ErrFileInTrash is used when the file is already in the trash 31 ErrFileInTrash = errors.New("File or directory is already in the trash") 32 // ErrFileNotInTrash is used when the file is not in the trash 33 ErrFileNotInTrash = errors.New("File or directory is not in the trash") 34 // ErrParentInTrash is used when trying to upload a file to a directory 35 // that is trashed 36 ErrParentInTrash = errors.New("Parent directory is in the trash") 37 // ErrNonAbsolutePath is used when the given path is not absolute 38 // while it is required to be 39 ErrNonAbsolutePath = errors.New("Path should be absolute") 40 // ErrDirNotEmpty is used to inform that the directory is not 41 // empty 42 ErrDirNotEmpty = errors.New("Directory is not empty") 43 // ErrWrongCouchdbState is given when couchdb gives us an unexpected value 44 ErrWrongCouchdbState = errors.New("Wrong couchdb reduce value") 45 // ErrFileTooBig is used when there is no more space left on the filesystem 46 ErrFileTooBig = errors.New("The file is too big and exceeds the disk quota") 47 // ErrMaxFileSize is used when a file is larger than the filesystem's maximum file size 48 ErrMaxFileSize = errors.New("The file is too big and exceeds the filesystem maximum file size") 49 // ErrFsckFailFast is used when the FSCK is stopped by the fail-fast option 50 ErrFsckFailFast = errors.New("FSCK has been stopped on first failure") 51 // ErrWrongToken is used when a key is not found on the store 52 ErrWrongToken = errors.New("Wrong download token") 53 // ErrInvalidMetadataID is used when the metadata cannot be found from a MetadatID parameter 54 ErrInvalidMetadataID = errors.New("Invalid or expired MetadataID") 55 )