Select

Object implementing file system operations and serialization for file paths. Provides functionality for retrieving metadata, listing directory contents, determining parent paths, checking the existence of paths, and computing relative paths. Delegates serialization-related functionality to the Serialization interface.

Functions

Link copied to clipboard
open suspend override fun exists(path: Path): Boolean

Checks if the specified file or directory exists at the given path.

Link copied to clipboard
open suspend override fun extension(path: Path): String

Retrieves the file extension from the specified path.

Link copied to clipboard
open override fun fromAbsoluteString(path: String): Path

Converts a string representation of an absolute file path into a Path object.

Link copied to clipboard
open override fun fromRelativeString(base: Path, path: String): Path

Converts a relative path string to a Path object by resolving it against a base path.

Link copied to clipboard
open suspend override fun list(path: Path): List<Path>

Retrieves a sorted list of paths within the specified directory.

Link copied to clipboard
open suspend override fun metadata(path: Path): FileMetadata?

Retrieves metadata for a given file or directory path.

Link copied to clipboard
open suspend override fun name(path: Path): String

Retrieves the name of the file or directory represented by the given path.

Link copied to clipboard
open suspend override fun parent(path: Path): Path?

Retrieves the parent directory of the specified path, if it exists.

Link copied to clipboard
open suspend override fun relative(root: Path, path: Path): String?

Computes the relative path from the specified root to the given path.

Link copied to clipboard
open suspend override fun relativize(root: Path, path: Path): String?

Computes the relative path from the given root to the specified path.

Link copied to clipboard
open override fun toAbsolutePathString(path: Path): String

Converts a given Path object into its absolute path representation as a string.

Link copied to clipboard
open override fun toPathString(path: Path): String

Converts the given path to a string representation of the file path.