bucket_download_folder - jaybgager/tracertools GitHub Wiki
[!NOTE] If this function is used on a Windows machine, any files that contain colons
:in their filenames will have them converted to triple-underscores___. This is because the Windows OS forbids the practice of including colons in filenames, as they're reserved for Drive names (e.g.C:\). This is a common issue with legacy-format neuroglancer volumes containing single-resolution unsharded meshes, which require several files to have colons in their names in order to function properly.
Downloads a folder from a cloudfiles-managed S3-style bucket.
Arguments:
bucket_path(string, mandatory)- the absolute path to the folder on the bucket you want to download
download_path(string, optional, default=None)- allows you to specify a manual save location
- value of
Noneattempts to save in defaultDownloadsfolder if one exists
Examples
Default Usage
This will save the bucket folder in your default Downloads folder if one exists, making the final local directory path read /home/username/Downloads/bucket_folder (or C:\Users\username\Downloads\bucket_folder on Windows).
INPUT:
import tracertools as tt
tt.bucket_download_folder(
bucket_path = "bucket://path/to/bucket_folder",
)
Manually Specify A Download Path
This will save bucket_folder in the local_folder directory instead, making the final local directory path read /home/username/local_folder/bucket_folder.
INPUT:
import tracertools as tt
tt.bucket_download_file(
bucket_path = "bucket://path/to/bucket_folder",
download_path = "/home/username/local_folder",
)