UNPKG

browserfs

Version:

A filesystem in your browser!

43 lines 1.54 kB
exports.__esModule = true; var api_error_1 = require("./api_error"); /** * Base class that contains shared implementations of functions for the file * object. */ var BaseFile = (function () { function BaseFile() { } BaseFile.prototype.sync = function (cb) { cb(new api_error_1.ApiError(api_error_1.ErrorCode.ENOTSUP)); }; BaseFile.prototype.syncSync = function () { throw new api_error_1.ApiError(api_error_1.ErrorCode.ENOTSUP); }; BaseFile.prototype.datasync = function (cb) { this.sync(cb); }; BaseFile.prototype.datasyncSync = function () { return this.syncSync(); }; BaseFile.prototype.chown = function (uid, gid, cb) { cb(new api_error_1.ApiError(api_error_1.ErrorCode.ENOTSUP)); }; BaseFile.prototype.chownSync = function (uid, gid) { throw new api_error_1.ApiError(api_error_1.ErrorCode.ENOTSUP); }; BaseFile.prototype.chmod = function (mode, cb) { cb(new api_error_1.ApiError(api_error_1.ErrorCode.ENOTSUP)); }; BaseFile.prototype.chmodSync = function (mode) { throw new api_error_1.ApiError(api_error_1.ErrorCode.ENOTSUP); }; BaseFile.prototype.utimes = function (atime, mtime, cb) { cb(new api_error_1.ApiError(api_error_1.ErrorCode.ENOTSUP)); }; BaseFile.prototype.utimesSync = function (atime, mtime) { throw new api_error_1.ApiError(api_error_1.ErrorCode.ENOTSUP); }; return BaseFile; }()); exports.BaseFile = BaseFile; //# sourceMappingURL=file.js.map