singlestoredb.management.workspace.Stage.listdir

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

List the files / folders at the given path.

Parameters:
  • stage_path (Path or str, optional) – Path to the stage location

  • recursive (bool, optional) – If True, recursively list all files and folders

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

Return type:

List[str] or List[FilesObject]