Duffer Derek

Current Path : /var/www/uibuilder.cmshelp.dk/httpdocs/node_modules/metro/src/node-haste/
Upload File :
Current File : /var/www/uibuilder.cmshelp.dk/httpdocs/node_modules/metro/src/node-haste/Package.js

"use strict";

const fs = require("fs");
const path = require("path");
class Package {
  constructor({ file }) {
    this.path = path.resolve(file);
    this._root = path.dirname(this.path);
    this._content = null;
  }
  invalidate() {
    this._content = null;
  }
  read() {
    if (this._content == null) {
      this._content = JSON.parse(fs.readFileSync(this.path, "utf8"));
    }
    return this._content;
  }
}
module.exports = Package;

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists