pi_portal.modules.system.file_system.FileSystem
- class pi_portal.modules.system.file_system.FileSystem(path: str)[source]
Bases:
objectAn object on the local file system.
- Parameters:
path (str) – A path on the local file system.
- create(directory: bool = False) None[source]
Ensure the path exists as either a directory or file.
- Parameters:
directory (bool) – A boolean indicating whether the target is a directory.
- ownership(user: str, group: str) None[source]
Set the owner and group of the file path in question.
- Parameters:
user (str) – The Linux user to set ownership to.
group (str) – The Linux group to set ownership to.