Skip to main content

Overview

The OpenComicAI.__dirname static property stores the base directory used to resolve paths to binary executables.

Type

Default value

Automatically set to the package’s installation directory. Uses __dirname in CommonJS environments or import.meta.dirname in ES modules.

Purpose

This property is used internally to locate platform-specific binary executables (realcugan, waifu2x, upscayl) included with the package.

Setting custom dirname

You can override the default directory using setDirname():

Example usage

Use cases

Portable applications

Development vs production

Custom binary distribution

How it’s used internally

The __dirname property is used by the binary() method to construct full paths to executables:

Path resolution

See also