to_file_database: Create Two Table Relational Database From Paths

Description Usage Arguments Value Examples

View source: R/file_database.R

Description

From a vector of given file paths, this function generates short and unique identifiers for files and folders. The assignements between identifiers and original paths are stored in two data frames, files and folders that are returned.

Usage

1
to_file_database(files, remove_common_base = TRUE)

Arguments

files

vector of file paths

remove_common_base

if TRUE (default) the common root of all files is removed before creating the database

Value

list of two data frames, files and folders

Examples

1
2
3
4
5
6
7
paths <- c(
  "very_long/very_ugly_path/even with spaces.doc",
  "very_long/very_ugly_path/even with spaces.docx"
)

to_file_database(paths)
to_file_database(paths, remove_common_base = FALSE)

KWB-R/kwb.file documentation built on Dec. 31, 2021, 8:15 p.m.