Searches for a specific file or folder, starting from the start directory and sequentially climbing up one directory level at a time. The first match causes this sequence to stop and the full path will be returned.

fileman_up(name, start = ".", levels = 10)

Arguments

name

Name of file or folder to search for. An exact match is needed. The matching is case sensitive.

start

String. Directory to start searching from.

levels

Integer. How many levels to sequentially climb up in the file hierarchy, if the file or folder is not found in the start directory?

Value

The path to the specified folder or file (string), or NULL if not found.

Details

Symbolic links are matched, and in the returned path they are converted.

See also

Other functions regarding file management for N2KHAB projects: checksum(), download_zenodo(), fileman_folders()

Examples

if (FALSE) {
fileman_up("n2khab_data")
}