asWindowsbasename: Create a Basename Valid in Windows

asWindowsbasenameR Documentation

Create a Basename Valid in Windows

Description

Windows basenames must not contain the control characters "\001" through "\037", double quote \", asterisk *, slash /, colon :, left and right chevrons <>, question mark ?, backslash \, and vertical bar |. Additionally, a Windows basename must not begin with a space, and must not end with a space or full stop. A basename which is valid in Windows is likely to be valid on any OS.

Usage

asWindowsbasename(path)

Arguments

path

character vector; the strings to make into valid paths.

Value

A character vector, the same length and attributes as path (after possible coercion to character).

Examples

asWindowsbasename(c(
    "  test  ",
    "  testing?.",
    "already valid name"
))

ArcadeAntics/essentials documentation built on Nov. 7, 2024, 4:33 p.m.