shadow:io

Class Path

Parent class

shadow:standard@Object

immutable class Path

Class Path provides utilities for managing a path to a file in the operating system.

Create Summary

Modifiers Return Types Method and Description
public () create(String path)

Creates a Path object corresponding to the path specified by the given String.

public () create(String[] components)

Destroy Summary

Modifiers Return Types Method and Description
public () destroy()

Method Summary

Modifiers Return Types Method and Description
public readonly (Path) copy(AddressMap addresses)
public readonly (String) toString()

Returns a String representation of the path.

Property Summary

Modifiers Return Types Method and Description
public readonly get locked (code) fileSeparator()

Gets the operating system-specific UTF-8 code point corresponding to the file separator, \ in Windows and / in Linux and macOS.

public readonly get locked (code) pathSeparator()

Gets the operating system-specific UTF-8 code point corresponding to the path separator, ; in Windows and : in Linux and macOS.

Create Detail

create

public create(String path) => ()

Creates a Path object corresponding to the path specified by the given String.

Parameters

path - path to file

create

public create(String[] components) => ()

Destroy Detail

destroy

public destroy() => ()

Method Detail

copy

public readonly copy(AddressMap addresses) => (Path)

toString

public readonly toString() => (String)

Returns a String representation of the path.

Returns

path as a String

Property Detail

fileSeparator

public readonly get locked fileSeparator() => (code)

Gets the operating system-specific UTF-8 code point corresponding to the file separator, \ in Windows and / in Linux and macOS.

Returns

separator character

pathSeparator

public readonly get locked pathSeparator() => (code)

Gets the operating system-specific UTF-8 code point corresponding to the path separator, ; in Windows and : in Linux and macOS.

Returns

separator character