Contents

removingRoot()

Creates a new path containing just the components, i.e. everything after root.

Declaration

func removingRoot() -> FilePath

Discussion

Returns self if root == nil.

Examples:

  • Unix:

    • /foo/bar => foo/bar

    • foo/bar => foo/bar

    • / => ""

  • Windows:

    • C:\foo\bar => foo\bar

    • foo\bar => foo\bar

    • \\?\UNC\server\share\file => file

    • \\?\device\folder\file.exe => folder\file.exe

    • \\server\share\file => file

    • \ => ""