class documentation

Abstract base class for loaders to provide resource reading support.

Method contents Return an iterable of entries in `package`.
Method is_resource Return True if the named 'path' is a resource.
Method open_resource Return an opened, file-like object for binary reading.
Method resource_path Return the file system path to the specified resource.
@abc.abstractmethod
def is_resource(self, path: Text) -> bool: (source)

Return True if the named 'path' is a resource. Files are resources, directories are not.

@abc.abstractmethod
def open_resource(self, resource: Text) -> BinaryIO: (source)

Return an opened, file-like object for binary reading. The 'resource' argument is expected to represent only a file name. If the resource cannot be found, FileNotFoundError is raised.

@abc.abstractmethod
def resource_path(self, resource: Text) -> Text: (source)

Return the file system path to the specified resource. The 'resource' argument is expected to represent only a file name. If the resource does not exist on the file system, raise FileNotFoundError.