JVMDocumentProvider

An implementation of the DocumentProvider interface for handling documents represented as Path objects. This object provides functionality to read and write text from files, allowing for document editing and text transformation while normalizing line separators.

Types

Link copied to clipboard

An implementation of the DocumentProvider.Edit interface for editing document contents.

Functions

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

Retrieves a document corresponding to the specified path.

Link copied to clipboard
open suspend override fun text(document: Path): CharSequence

Retrieves the full text content of the given document as a character sequence.

Link copied to clipboard
open suspend fun textFragment(document: Path, range: DocumentProvider.DocumentRange): String

Extracts a specified fragment of text from a given document based on a defined range.