Skip to content
On this page

๐Ÿ“‚ @bridge/com-mojang

This module allows access to the com.mojang file system. View Source Code

import { ... } from "@bridge/com-mojang"

๐Ÿ’ผ Variables


A signal that states whether the com.mojang folder has been setup by the user.

  • Type: Signal<void>
// Wait for the com.mojang folder to be setup before interacting with it
await setup.fired
// ...

// Check that the com.mojang folder has already been setup
if (setup.hasFired) {
	console.log('com.mojang linking has been setup')

โšก Functions


The requestFileSystem function returns the com.mojang file system instance.

  • Signature: requestFileSystem()
  • Returns: Promise<FileSystem>
const comMojangFs = await requestFileSystem()

if (await comMojangFs.directoryExists('test')) {
	console.log('The folder "test" exists in the com.mojang folder.')


This file system instance will have the same methods as the @bridge/fs module, except for the onBridgeFolderSetup method.

Released under the GPL-3.0 License.