extract_archive: Extract Archive

View source: R/dataset-utils.R

extract_archiveR Documentation

Extract Archive

Description

Extract Archive

Usage

extract_archive(from_path, to_path = NULL, overwrite = FALSE)

Arguments

from_path

(str): the path of the archive.

to_path

(str, optional): the root path of the extraced files (directory of from_path) (Default: NULL)

overwrite

(bool, optional): overwrite existing files (Default: FALSE)

Value

list: List of paths to extracted files even if not overwritten.

Examples

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)
}


torchaudio documentation built on Feb. 16, 2023, 9:41 p.m.