walk_files: List recursively all files ending with a suffix at a given...

View source: R/dataset-utils.R

walk_filesR Documentation

List recursively all files ending with a suffix at a given root

Description

List recursively all files ending with a suffix at a given root

Usage

walk_files(root, suffix, prefix = FALSE, remove_suffix = FALSE)

Arguments

root

(str): Path to directory whose folders need to be listed

suffix

(str or tuple): Suffix of the files to match, e.g. '.png' or ('.jpg', '.png'). It uses the Python "str.endswith" method and is passed directly

prefix

(bool, optional): If TRUE, prepends the full path to each result, otherwise only returns the name of the files found (Default: FALSE)

remove_suffix

(bool, optional): If TRUE, removes the suffix to each result defined in suffix, otherwise will return the result as found (Default: FALSE).


curso-r/torchaudio documentation built on May 4, 2023, 2:27 a.m.