singlestoredb.management.files.FileSpace¶
- class singlestoredb.management.files.FileSpace(location: str, manager: FilesManager)¶
FileSpace manager.
This object is not instantiated directly. It is returned by
FilesManager.personal_space,FilesManager.shared_spaceorFileManger.models_space.- __init__(location: str, manager: FilesManager)¶
Methods
__init__(location, manager)download_file(path[, local_path, overwrite, ...])Download the content of a file path.
download_folder(path[, local_path, overwrite])Download a FileSpace folder to a local directory.
exists(path)Does the given file path exist?
info(path)Return information about a file location.
is_dir(path)Is the given file path a directory?
is_file(path)Is the given file path a file?
listdir([path, recursive])List the files / folders at the given path.
mkdir(path[, overwrite])Make a directory in the file space.
mkdirs(path[, overwrite])Make a directory in the file space.
open(path[, mode, encoding])Open a file path for reading or writing.
remove(path)Delete a file location.
removedirs(path)Delete a folder recursively.
rename(old_path, new_path, *[, overwrite])Move the file to a new location.
rmdir(path)Delete a folder.
upload_file(local_path, path, *[, overwrite])Upload a local file.
upload_folder(local_path, path, *[, ...])Upload a folder recursively.