utils#

Functions

download_if_needed(uri[, download_dir, fs, ...])

Download a file to a directory if remote and return its local path.

download_or_copy(uri, target_dir[, fs])

Download or copy a file to a directory and return the local file path.

extract(uri[, target_dir, download_dir])

Extract a compressed file.

file_exists(uri[, fs, include_dir])

Check if file exists.

file_to_json(uri)

Load data from JSON file at uri.

file_to_str(uri[, fs])

Load contents of text file into a string.

get_local_path(uri, download_dir[, fs])

Return the path where a local copy of URI should be stored.

get_tmp_dir()

Return temporary directory given by the RVConfig.

is_archive(uri)

Check if the URI's extension represents an archived file.

is_local(uri)

json_to_file(obj, uri)

Serialize obj to JSON and upload to uri.

list_paths(uri[, ext, fs])

List paths rooted at URI.

start_sync(src_dir, dst_dir_uri[, ...])

Repeatedly sync a local source directory to a destination on a schedule.

str_to_file(content_str, uri[, fs])

Writes string to text file.

sync_from_dir(src_dir_uri, dst_dir[, delete, fs])

Synchronize a source directory to local destination directory.

sync_to_dir(src_dir, dst_dir_uri[, delete, fs])

Synchronize a local source directory to destination directory.

unzip(zip_path, target_dir)

Unzip contents of zip file at zip_path into target_dir.

upload_or_copy(src_path, dst_uri[, fs])

Upload or copy a file.

uri_to_vsi_path(uri)

A function to convert URIs to VSI path strings.

zipdir(dir, zip_path)

Save a zip file with contents of directory.