| Server IP : 185.208.173.17 / Your IP : 87.236.161.98 Web Server : Microsoft-IIS/10.0 System : Windows NT SRV8576125506 10.0 build 26100 (Windows Server 2016) AMD64 User : IUSR ( 0) PHP Version : 7.4.13 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/inetpub/wwwroot/parsmega.nuxt/node_modules/memfs/lib/fsa-to-node/ |
Upload File : |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.testDirectoryIsWritable = exports.pathToLocation = void 0;
const pathToLocation = (path) => {
if (path[0] === "/" /* FsaToNodeConstants.Separator */)
path = path.slice(1);
if (path[path.length - 1] === "/" /* FsaToNodeConstants.Separator */)
path = path.slice(0, -1);
const lastSlashIndex = path.lastIndexOf("/" /* FsaToNodeConstants.Separator */);
if (lastSlashIndex === -1)
return [[], path];
const file = path.slice(lastSlashIndex + 1);
const folder = path.slice(0, lastSlashIndex).split("/" /* FsaToNodeConstants.Separator */);
return [folder, file];
};
exports.pathToLocation = pathToLocation;
const testDirectoryIsWritable = async (dir) => {
const testFileName = '__memfs_writable_test_file_' + Math.random().toString(36).slice(2) + Date.now();
try {
await dir.getFileHandle(testFileName, { create: true });
return true;
}
catch (_a) {
return false;
}
finally {
try {
await dir.removeEntry(testFileName);
}
catch (e) { }
}
};
exports.testDirectoryIsWritable = testDirectoryIsWritable;
//# sourceMappingURL=util.js.map