getOrCreate

@JvmStatic
protected fun getOrCreate(resourceDir: File, extract: (resourceDir: File) -> GeoipFiles, create: (resourceDir: File) -> TorApi, toString: (resourceDir: File) -> String): ResourceLoader.Tor(source)

For implementors of NoExec.

NOTE: extract and create are always invoked while holding a lock and are synchronized. The resulting TorApi reference from create is cached so a single instance is only every created, and subsequently reused.

Throws

If absoluteFile2 has to reference the filesystem to construct an absolute path and fails due to a filesystem security exception.

UnsupportedOperationException

On Kotlin/JS-Browser if absoluteFile2 references the filesystem to construct an absolute path.