Something went wrong. Try again.
The latest iteration of my personal site. ethana.dev
Something went wrong. Try again.
489 B · 13 lines
JavaScript
at master
1234567891011121314import path from "node:path";const __dirname = import.meta.dirname;
/** * Constructs and returns an absolute file path by resolving a given relative path * against the current directory of the module. * * @param {string} relativePath - The relative file path to be resolved. * @return {string} The absolute file path generated by combining the current directory and the relative path. */export function getFilePath(relativePath) { return path.join(__dirname, relativePath);}