File systems#
- class gordo_core.file_systems.base.FileInfo(file_type: FileType, size: int, access_time: datetime | None = None, modify_time: datetime | None = None, create_time: datetime | None = None)[source]#
Bases:
objectFile/directory information.
- class gordo_core.file_systems.base.FileSystem[source]#
Bases:
objectAn interface for file system implementations.
- join(*p) str[source]#
Join two or more pathname components, specific for this file system.
- Parameters:
p – Path components list.
- abstract ls(path: str, with_info: bool = True) Iterable[Tuple[str, FileInfo | None]][source]#
Returns a list containing the names of the files in the directory.
- Parameters:
path – Directory path.
with_info – Retrieves
FileInfofor each item. Otherwise, will beNonefor all items.
- abstract open(path: str, mode: str = 'r') IO[source]#
Open a file.
open()analog for this file system.- Parameters:
path – Path to the file
mode – Required support at least of r,`b` modes