UNPKG

@minecraft/creator-tools

Version:

Minecraft Creator Tools command line and libraries.

32 lines (30 loc) 967 B
"use strict"; // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", { value: true }); const Folder_1 = require("./Folder"); const StorageBase_1 = require("./StorageBase"); class Storage extends StorageBase_1.default { constructor() { super(); this.rootFolder = new Folder_1.default(this, null, "", "root"); } joinPath(pathA, pathB) { let fullPath = pathA; if (!fullPath.endsWith(Storage.folderDelimiter)) { fullPath += Storage.folderDelimiter; } fullPath += pathB; return fullPath; } static getParentFolderPath(path) { const lastDelim = path.lastIndexOf(this.folderDelimiter); if (lastDelim < 0) { return path; } return path.substring(0, lastDelim); } } exports.default = Storage; Storage.folderDelimiter = "/"; //# sourceMappingURL=../maps/storage/Storage.js.map