fileman_up: Climb up in the file system hierarchy to find a file or...

fileman_upR Documentation

Climb up in the file system hierarchy to find a file or folder

Description

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.

Usage

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?

Details

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

Value

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

See Also

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

Examples

## Not run: 
fileman_up("n2khab_data")

## End(Not run)


inbo/n2khab documentation built on Jan. 15, 2025, 9:36 a.m.