WindowsPath

A notation for paths on a Windows file system. Parsing will recognise all substrings that are separated by \ as a part. Printing will print the parts separated by \ after removing the following characters from them:

  • ASCII control characters

  • <, >, :, ", /, \, |, ?, *

To allow printing paths that start with a drive letter, the notation will not strip a : from the first part if it’s the last character.

Functions

Link copied to clipboard
open override fun parse(sourceString: String): Word

Transforms an input string that is in this notation into a notation-agnostic Word.

Link copied to clipboard
open override fun print(word: Word): String

Transforms a Word into a string that is formatted according to this notation.

Link copied to clipboard
open override fun toString(): String