bibliotekar.fs.FileType#

class bibliotekar.fs.FileType(*values)[source]#

Enum of file types.

__init__(*args, **kwds)#

Methods

guess_from_path(path)

Guess the type of a file.

suffixes()

Return a list of file suffixes for the file type.

Attributes

Notebook

A Jupyter notebook.

PythonScript

A Python script.

NotebookTemplate

A Jupyter notebook template.

Unknown

An unknown file type.

Notebook = 'notebook'#

A Jupyter notebook.

NotebookTemplate = 'notebook_template'#

A Jupyter notebook template.

PythonScript = 'python_script'#

A Python script.

Unknown = 'unknown'#

An unknown file type.

classmethod guess_from_path(path)[source]#

Guess the type of a file.

Return type:

FileType

suffixes()[source]#

Return a list of file suffixes for the file type.

Return type:

list[str]