UNPKG

@cocalc/backend

Version:

CoCalc backend functionality: functionality used by either the hub, the next.js server or the project.

22 lines 813 B
"use strict"; /* * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc. * License: AGPLv3 s.t. "Commons Clause" – see LICENSE.md for details */ Object.defineProperty(exports, "__esModule", { value: true }); exports.unlink = exports.readFile = exports.exists = void 0; const promises_1 = require("node:fs/promises"); Object.defineProperty(exports, "readFile", { enumerable: true, get: function () { return promises_1.readFile; } }); Object.defineProperty(exports, "unlink", { enumerable: true, get: function () { return promises_1.unlink; } }); async function exists(path) { // fs.exists is deprecated try { await (0, promises_1.access)(path); return true; } catch { return false; } } exports.exists = exists; //# sourceMappingURL=async-utils-node.js.map