singlestoredb.management.files.FileSpace.listdir

FileSpace.listdir(path: str | PathLike[str] = '/', *, recursive: bool = False, return_objects: Literal[True]) List[FilesObject]
FileSpace.listdir(path: str | PathLike[str] = '/', *, recursive: bool = False, return_objects: Literal[False] = False) List[str]

List the files / folders at the given path.

Parameters:
  • path (Path or str, optional) – Path to the file location

  • return_objects (bool, optional) – If True, return list of FilesObject instances. Otherwise just paths.

Return type:

List[str] or List[FilesObject]