Return the origin of a file path

get_file_origin(file)

Arguments

file

A source_file object or character string

Value

file origin as a character string

Examples


fpath <- source_file('some/file/path.txt', origin='onedrive')
get_file_origin(fpath)
#> [1] "onedrive"