IF Commons GitHub

names

Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0002-anyfs-onedrive-store FR-007

The names OneDrive keeps, and the path of an item: a segment may not hold a character of " * : < > ? / \ |, may not begin with a space nor end with a space or a dot, and may not be a name of a device (CON, PRN, AUX, NUL, COM0 to COM9, LPT0 to LPT9, with or without an extension), .lock, desktop.ini, _vti_, or begin with ~$. A path of the store is mapped to the address Graph takes for an item below a drive (/me/drive/root:/a/b), each segment written as a URL part.

import { segmentProblem } from "./names.ts";
segmentProblem("report.txt"); // undefined
segmentProblem("a:b"); // "a character of \" * : < > ? / \\ | is not in a name of OneDrive"

Source: commons/anyfs-onedrive/src/names.ts

1 of 2 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.

pathProblemfunctionno test imports it
function pathProblem(path: string): string | undefined

The reason a path is not one OneDrive keeps, or nothing where it is.

segmentProblemfunction
function segmentProblem(segment: string): string | undefined

Why a segment is not a name of OneDrive, or nothing where it is one.

Imported by 9 tests of the run (9 passed, 0 failed): the library's results

Titles, headings, exports, tables, columns and requirements. Esc closes.