extract_archive.Rd
Extract Archive
extract_archive(from_path, to_path = NULL, overwrite = FALSE)
(str): the path of the archive.
(str, optional): the root path of the extraced files (directory of from_path) (Default: NULL
)
(bool, optional): overwrite existing files (Default: FALSE
)
list: List of paths to extracted files even if not overwritten.
if(torch::torch_is_installed()) {
url = 'http://www.quest.dcs.shef.ac.uk/wmt16_files_mmt/validation.tar.gz'
d <- fs::dir_create(tempdir(), "torchaudio")
from_path <- fs::path(d, basename(url))
utils::download.file(url = url, destfile = from_path)
torchaudio::extract_archive (from_path, d)
}