fromPath

fun fromPath(path: String, options: FromPathOptions = definedExternally): Session(source)

A session instance from the absolute path as specified by the path string. When there is an existing Session with the same absolute path, it will be returned; otherwise a new Session instance will be created with options. The call will throw an error if the path is not an absolute path. Additionally, an error will be thrown if an empty string is provided.

To create a Session with options, you have to ensure the Session with the path has never been used before. There is no way to change the options of an existing Session object.