UNPKG

@cocalc/project

Version:
22 lines 736 B
"use strict"; /* Create the root symbolic link, so that it is possible to browse the entire filesystem, including tmp. */ Object.defineProperty(exports, "__esModule", { value: true }); const fs_1 = require("fs"); const awaiting_1 = require("awaiting"); const data_1 = require("@cocalc/project/data"); async function init() { try { // not using fs.exists, since it is DEPRECATED. await (0, awaiting_1.callback)(fs_1.access, data_1.rootSymlink, fs_1.constants.F_OK); // exists so nothing to do. } catch (_err) { // doesn't exist, so create it await (0, awaiting_1.callback)(fs_1.symlink, "/", data_1.rootSymlink); } } exports.default = init; //# sourceMappingURL=root-symlink.js.map