Utility classes & functions

Volume driver utils

Access control

elfinder.utils.accesscontrol.fs_standard_access(attr, path, volume)[source]

Make dotfiles not readable, not writable, hidden and locked. Should return None to allow for original attribute value, boolean otherwise. This can be used in the accessControl setting.

Args:
attr:One of read, write, hidden and locked.
path:The path to check against.
volume:The volume responsible for managing the path.
Returns:
True if path has attr permissions, False if not and None to apply the default permission rules.

Archivers

class elfinder.utils.archivers.ZipFileArchiver(*args, **kwargs)[source]

An archiver used to generate .zip files. This wraps Python’s built in zipfile.ZipFile methods to operate exactly like tarfile.TarFile does.

add(*args, **kwargs)[source]

Add file to the archive.

close()[source]

Close the archive.

extractall(*args, **kwargs)[source]

Extract all files from the archive.

classmethod open(*args, **kwargs)[source]

Open the archive. This must be a classmethod.