Skip to content

Function: init() ​

Opens an osu!lazer client.realm database.

This example requires Node.js.

ts
import init from 'osu-files'

const db = init('./client.realm', { filesFolderPath: './files' })
const sets = db.sets.get
const rawRealm = db.realm.raw
db.close()

Call Signature ​

init(path, options?): OsuFilesAPI

Defined in: src/index.ts:333

Parameters ​

ParameterTypeDescription
pathstringPath to client.realm.
options?InitOptionsConfiguration options.

Returns ​

OsuFilesAPI

The osu-files API object with close(), logger, and all sub-modules.

Throws ​

If the requested schema version is unsupported or Realm cannot open the file.

See ​

https://github.com/ppy/osu for the upstream osu!lazer implementation.

Released under the MIT License.