extract.drive.vec: Extract drive letter from full path (vectorized)

View source: R/file-functions.R

extract.drive.vecR Documentation

Extract drive letter from full path (vectorized)

Description

fn is a vector full paths to files. This function identifies the drive letter (if there is one). Three situations (1) None : No drive is given. Drive="" Rest=x (2) One : The drive is given. Drive=before Rest=after (3) Two+ : Nonsense syntax. Drive=before.last Rest=after.last See also extract.drive.vec and split.filename.

Usage

none

Arguments

fn.vec

is a vector of full paths to files such as "c:/data/catest.txt".

Value

list(org=fn, drive=before, rest=after)

Author(s)

Claus E. Andersen


claus-e-andersen/clanTools documentation built on June 2, 2024, 6:23 a.m.