Skip to content

homeDir ​

homeDir returns the user's home directory.

SignaturehomeDir(): string
tyrus
import { homeDir } from "tyrus:os";

const home: string = homeDir();
print(`home: ${home}`);

Never fails the program

Falls back to an empty string if it cannot be determined, rather than aborting the program.