ReadOnly
Defines a read-only interface that combines the functionalities of serialization, file selection, and file reading in a file system or comparable data structure.
Parameters
Represents the type of the path used to reference files or directories.
This interface inherits methods from the following:
Serialization
: Serialization and deserialization of file paths into string representations.Select
: Operations to fetch metadata, list contents, navigate parent directories, and check existence.Read
: Functionality to read file content, access file content as a source, and determine file size.
Implementers of this interface are expected to provide implementations for all functionality associated with serialization, selection, and reading, ensuring a complete read-only perspective of the file system or equivalent storage mechanisms.
This interface is useful in scenarios where modification operations are either undesired or disallowed, offering controlled access to an underlying file or directory structure.
Inheritors
Functions
Converts a string representation of an absolute file path into a Path object.
Converts a relative path string to a Path
object by resolving it against a base path.
Retrieves the metadata associated with the specified file or directory.
Relativizes the given path path
based on the specified root
path. This function calculates the relative path from the root
to the path
.
Converts a given Path object into its absolute path representation as a string.
Converts the given path to a string representation of the file path.