Adding a filesystem#
On this page you can find information relating to the steps required to add a file system to scrappi. File systems provide a way to generate product paths matching the file organisation on different systems.
Creating a file system Class#
Different file systems can be defined. These can either be named file systems (e.g. “t-drive”), or LocalFyleSystems pointing to a given directory.
These file systems all inherit from scrappi.fs.base.BaseFileSystem and can make use of methods
within the class.
Required#
File systems all inherit from scrappi.fs.base.BaseFileSystem and must therefore
contain the following methods, properties and attributes:
Docstring |
Extra Info |
||
|---|---|---|---|
@abstractmethods |
|||
|
|
if check_exists is True, the output should instead be a tuple with (path,exists), where path is the returned path, and exists is a boolean indicating whether this path exists. |
|
|
|
||
class attributes |
|||
|
|
file system base directory (default: current working directory) |
New file systems should also be added to scrappi.fs.factory.