"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var api_1 = require("./api");
var promise_utils_1 = require("./promise-utils");
var TimeoutFileSystem = /** @class */ (function () {
    function TimeoutFileSystem(timeout, fs) {
        this.timeout = timeout;
        this.fs = fs;
    }
    Object.defineProperty(TimeoutFileSystem.prototype, "events", {
        get: function () {
            return this.fs.events;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TimeoutFileSystem.prototype, "baseUrl", {
        get: function () {
            return this.fs.baseUrl;
        },
        enumerable: true,
        configurable: true
    });
    TimeoutFileSystem.prototype.saveFile = function (fullPath, newContent) {
        return promise_utils_1.timeoutPromise(this.fs.saveFile(fullPath, newContent), this.timeout);
    };
    TimeoutFileSystem.prototype.deleteFile = function (fullPath) {
        return promise_utils_1.timeoutPromise(this.fs.deleteFile(fullPath), this.timeout);
    };
    TimeoutFileSystem.prototype.deleteDirectory = function (fullPath, recursive) {
        return promise_utils_1.timeoutPromise(this.fs.deleteDirectory(fullPath, recursive), this.timeout);
    };
    TimeoutFileSystem.prototype.loadTextFile = function (fullPath) {
        return promise_utils_1.timeoutPromise(this.fs.loadTextFile(fullPath), this.timeout);
    };
    TimeoutFileSystem.prototype.loadDirectoryTree = function (fullPath) {
        return promise_utils_1.timeoutPromise(this.fs.loadDirectoryTree(fullPath), this.timeout);
    };
    TimeoutFileSystem.prototype.loadDirectoryChildren = function (fullPath) {
        return promise_utils_1.timeoutPromise(this.fs.loadDirectoryChildren(fullPath), this.timeout);
    };
    TimeoutFileSystem.prototype.ensureDirectory = function (fullPath) {
        return promise_utils_1.timeoutPromise(this.fs.ensureDirectory(fullPath), this.timeout);
    };
    TimeoutFileSystem.prototype.dispose = function () {
        if (api_1.isDisposable(this.fs))
            this.fs.dispose();
    };
    return TimeoutFileSystem;
}());
exports.TimeoutFileSystem = TimeoutFileSystem;
//# sourceMappingURL=timeout-fs.js.map