fs.errors¶
Exception classes thrown by filesystem operations.
Errors relating to the underlying filesystem are translated in to one of the following exceptions.
All Exception classes are derived from FSError
which may be used as a catch-all filesystem exception.
-
exception
fs.errors.
BulkCopyFailed
(errors)[source]¶ Bases:
fs.errors.FSError
A copy operation failed in worker threads.
-
exception
fs.errors.
CreateFailed
(msg=None, exc=None)[source]¶ Bases:
fs.errors.FSError
Filesystem could not be created.
-
exception
fs.errors.
DestinationExists
(path, exc=None, msg=None)[source]¶ Bases:
fs.errors.ResourceError
Target destination already exists.
-
exception
fs.errors.
DirectoryExists
(path, exc=None, msg=None)[source]¶ Bases:
fs.errors.ResourceError
Directory already exists.
-
exception
fs.errors.
DirectoryExpected
(path, exc=None, msg=None)[source]¶ Bases:
fs.errors.ResourceInvalid
Operation only works on directories.
-
exception
fs.errors.
DirectoryNotEmpty
(path, exc=None, msg=None)[source]¶ Bases:
fs.errors.ResourceError
Attempt to remove a non-empty directory.
-
exception
fs.errors.
FileExists
(path, exc=None, msg=None)[source]¶ Bases:
fs.errors.ResourceError
File already exists.
-
exception
fs.errors.
FileExpected
(path, exc=None, msg=None)[source]¶ Bases:
fs.errors.ResourceInvalid
Operation only works on files.
-
exception
fs.errors.
FilesystemClosed
(msg=None)[source]¶ Bases:
fs.errors.FSError
Attempt to use a closed filesystem.
-
exception
fs.errors.
IllegalBackReference
(path)[source]¶ Bases:
ValueError
Too many backrefs exist in a path.
This error will occur if the back references in a path would be outside of the root. For example,
"/foo/../../"
, contains two back references which would reference a directory above the root.Note
This exception is a subclass of
ValueError
as it is not strictly speaking an issue with a filesystem or resource.
-
exception
fs.errors.
IllegalDestination
(path=None, exc=None, msg=None)[source]¶ Bases:
fs.errors.OperationFailed
The given destination cannot be used for the operation.
This error will occur when attempting to move / copy a folder into itself or copying a file onto itself.
-
exception
fs.errors.
InsufficientStorage
(path=None, exc=None, msg=None)[source]¶ Bases:
fs.errors.OperationFailed
Storage is insufficient for requested operation.
-
exception
fs.errors.
InvalidCharsInPath
(path, msg=None, exc=None)[source]¶ Bases:
fs.errors.InvalidPath
Path contains characters that are invalid on this filesystem.
-
exception
fs.errors.
InvalidPath
(path, msg=None, exc=None)[source]¶ Bases:
fs.errors.PathError
Path can’t be mapped on to the underlaying filesystem.
-
exception
fs.errors.
MissingInfoNamespace
(namespace)[source]¶ Bases:
AttributeError
An expected namespace is missing.
-
exception
fs.errors.
NoSysPath
(path, msg=None, exc=None)[source]¶ Bases:
fs.errors.PathError
The filesystem does not provide sys paths to the resource.
-
exception
fs.errors.
NoURL
(path, purpose, msg=None)[source]¶ Bases:
fs.errors.PathError
The filesystem does not provide an URL for the resource.
-
exception
fs.errors.
OperationFailed
(path=None, exc=None, msg=None)[source]¶ Bases:
fs.errors.FSError
A specific operation failed.
-
exception
fs.errors.
OperationTimeout
(path=None, exc=None, msg=None)[source]¶ Bases:
fs.errors.OperationFailed
Filesystem took too long.
-
exception
fs.errors.
PathError
(path, msg=None, exc=None)[source]¶ Bases:
fs.errors.FSError
Base exception for errors to do with a path string.
-
exception
fs.errors.
PatternError
(pattern, position, exc=None, msg=None)[source]¶ Bases:
ValueError
A string pattern with invalid syntax was given.
-
exception
fs.errors.
PermissionDenied
(path=None, exc=None, msg=None)[source]¶ Bases:
fs.errors.OperationFailed
Not enough permissions.
-
exception
fs.errors.
RemoteConnectionError
(path=None, exc=None, msg=None)[source]¶ Bases:
fs.errors.OperationFailed
Operations encountered remote connection trouble.
-
exception
fs.errors.
RemoveRootError
(path=None, exc=None, msg=None)[source]¶ Bases:
fs.errors.OperationFailed
Attempt to remove the root directory.
-
exception
fs.errors.
ResourceError
(path, exc=None, msg=None)[source]¶ Bases:
fs.errors.FSError
Base exception class for error associated with a specific resource.
-
exception
fs.errors.
ResourceInvalid
(path, exc=None, msg=None)[source]¶ Bases:
fs.errors.ResourceError
Resource has the wrong type.
-
exception
fs.errors.
ResourceLocked
(path, exc=None, msg=None)[source]¶ Bases:
fs.errors.ResourceError
Attempt to use a locked resource.
-
exception
fs.errors.
ResourceNotFound
(path, exc=None, msg=None)[source]¶ Bases:
fs.errors.ResourceError
Required resource not found.
-
exception
fs.errors.
ResourceReadOnly
(path, exc=None, msg=None)[source]¶ Bases:
fs.errors.ResourceError
Attempting to modify a read-only resource.
-
exception
fs.errors.
Unsupported
(path=None, exc=None, msg=None)[source]¶ Bases:
fs.errors.OperationFailed
Operation not supported by the filesystem.
-
exception
fs.errors.
UnsupportedHash
[source]¶ Bases:
ValueError
The requested hash algorithm is not supported.
This exception will be thrown if a hash algorithm is requested that is not supported by hashlib.