async function getFile()

in devel/psql/psql.js [39:55]


async function getFile(filename) {
    let fullFileName = '';
    if (!path.isAbsolute(filename)) {
        fullFileName = [
            process.env.OPS_PWD,
            filename
        ].join(path.sep);
    } else {
        fullFileName = filename;
    }

    const file = Bun.file(fullFileName);
    if (!await file.exists()) {
        throw Error(`File ${fullFileName} doesn't exists`);
    }
    return await file.text();
}