resolveLocalImport

abstract suspend fun resolveLocalImport(path: String): TextSourceFile(source)

Resolves a local import from given path and returns a text source file. This function may throw in error cases, in which case a compilation error report will be generated. This will not necessarily abort compilation immediately, but it is guaranteed that the final compilation result is failure.

Return

A loaded TextSourceFile with a reference handle that uniquely identifies this file.

Parameters

path

The requested local path to resolve and load. This value is user-controlled and may contain ANY combination of characters, including empty strings. Be aware of possible path expansion attacks and treat this path with care.

Throws

in error cases. It is implementation-defined which specific exception is thrown.