"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 {
    rootFolder;
    static folderDelimiter = "/";
    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;

//# sourceMappingURL=../maps/storage/Storage.js.map
