utils#

Functions

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

Download a file into a directory if it's remote.

download_or_copy(uri, target_dir[, ...])

Downloads or copies a file to a directory.

extract(uri[, target_dir, download_dir])

Extract a compressed file.

file_exists(uri[, fs, include_dir])

Check if file exists.

file_to_json(uri)

Return JSON dict based on 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(content_dict, uri)

Upload JSON file to uri based on content_dict.

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.

zipdir(dir, zip_path)

Save a zip file with contents of directory.