Defines the Exception classes thrown by PyFilesystem objects. Exceptions relating to the underlying filesystem are translated in to one of the following Exceptions. Exceptions that relate to a path store that path in self.path.

All Exception classes are derived from FSError which can be used as a catch-all exception.

exception fs.errors.FSError(msg=None, details=None)

Base exception class for the FS module.

exception fs.errors.CreateFailedError(msg=None, details=None)

An exception thrown when a FS could not be created

exception fs.errors.PathError(path='', **kwds)

Exception for errors to do with a path string.

exception fs.errors.InvalidPathError(path='', **kwds)

Base exception for fs paths that can’t be mapped on to the underlaying filesystem.

exception fs.errors.InvalidCharsInPathError(path='', **kwds)

The path contains characters that are invalid on this filesystem

exception fs.errors.OperationFailedError(opname='', path=None, **kwds)

Base exception class for errors associated with a specific operation.

exception fs.errors.UnsupportedError(opname='', path=None, **kwds)

Exception raised for operations that are not supported by the FS.

exception fs.errors.RemoteConnectionError(opname='', path=None, **kwds)

Exception raised when operations encounter remote connection trouble.

exception fs.errors.StorageSpaceError(opname='', path=None, **kwds)

Exception raised when operations encounter storage space trouble.

exception fs.errors.ResourceError(path='', **kwds)

Base exception class for error associated with a specific resource.

exception fs.errors.NoSysPathError(path='', **kwds)

Exception raised when there is no syspath for a given path.

exception fs.errors.NoMetaError(meta_name, msg=None)

Exception raised when there is no meta value available.

exception fs.errors.NoPathURLError(path='', **kwds)

Exception raised when there is no URL form for a given path.

exception fs.errors.ResourceNotFoundError(path='', **kwds)

Exception raised when a required resource is not found.

exception fs.errors.ResourceInvalidError(path='', **kwds)

Exception raised when a resource is the wrong type.

exception fs.errors.DestinationExistsError(path='', **kwds)

Exception raised when a target destination already exists.

exception fs.errors.DirectoryNotEmptyError(path='', **kwds)

Exception raised when a directory to be removed is not empty.

exception fs.errors.ParentDirectoryMissingError(path='', **kwds)

Exception raised when a parent directory is missing.

exception fs.errors.ResourceLockedError(path='', **kwds)

Exception raised when a resource can’t be used because it is locked.

exception fs.errors.NoMMapError(path='', **kwds)

Exception raise when getmmap fails to create a mmap

exception fs.errors.BackReferenceError

Exception raised when too many backrefs exist in a path (ex: ‘/..’, ‘/docs/../..’).


Function wrapper to convert FSError instances into OSError.


Function wrapper to convert OSError/IOError instances into FSError.