Skip to contents

This function checks if a specific file exists in a given directory and optionally its subdirectories.

Usage

ngr_str_dir_from_file(path_dir, file_name, recurse = FALSE, ...)

Arguments

path_dir

character A single string representing the directory path to search.

file_name

character A string specifying the name of the file to detect.

recurse

logical Whether to search recursively in subdirectories. Default is FALSE.

...

Additional arguments passed to fs::dir_ls().

Value

character The directory path if the file is found; otherwise, a warning is issued.