Directory.list
Directory.list(max_results, *, mode, recursive) → list(File | Directory)
List the contents of a given directory.
Parameters:
max_results : int, default None
If specified, will only list up to the specified number of files and/or directories
mode : "all" | "files" | "directories", default "all"
By default, this method will return a list of files and directories within the current directory. Specify an alternative mode to only list a given entity type.
recursive : bool, default False
Whether to recursively crawl the directory tree and return all files and/or directories. If False (the default), only entities directly in this directory will be returned.
Returns:
Examples:
import redivis
dir = redivis.table("table_ref").to_directory()
print(dir.list()) # list files + directories within this directory
all_files = dir.list(mode="files", recursive=True)Last updated
Was this helpful?

