src/utils/appdata.js
/**
   * Constructor for file persistence handle,
   * uses user home directory + <sAppName> + / + sFileName for persitence
   * @param sAppName {string} the application name
   * @param sFileName {string} the filename
   * @constructor
   */
Constructor for file persistence handle,
uses user home directory +  + / + sFileName for persitence
@param sAppName {string} the application name
@param sFileName {string} the filename
@constructor
Constructor for file persistence handle uses user home directory + + / + sFileName for persitence @param sAppName { string } the application name @param sFileName { string } the filename @constructor
function PersistenceHandle(sAppName, sFileName) {
    this.AppName = sAppName;
    logger.log('Dest' + sAppName);
    this.dir = getUserHome() + path.sep + sAppName;
    this.fileName = this.dir + path.sep + sFileName;
    this.filename = process.env['USERDATA'] || this.filename;
    this.data = {};
    if (!fs.existsSync(this.dir)) {
      fs.mkdirSync(this.dir);
    }
    try {
      this.data = JSON.parse(fs.readFileSync(this.fileName));
    } catch (e) {
      this.data = {};
    }
  }
function PersistenceHandle ( sAppName , sFileName ) { this . AppName = sAppName ; logger . log ( 'Dest' + sAppName ) ; this . dir = getUserHome ( ) + path . sep + sAppName ; this . fileName = this . dir + path . sep + sFileName ; this . filename = process . env [ 'USERDATA' ] || this . filename ; this . data = { } ; if ( ! fs . existsSync ( this . dir ) ) { fs . mkdirSync ( this . dir ) ; } try { this . data = JSON . parse ( fs . readFileSync ( this . fileName ) ) ; } catch ( e ) { this . data = { } ; } }
Constructor for file persistence handle,
 uses user home directory + <sAppName> + / + sFileName for persitence
 @param sAppName {string} the application name
 @param sFileName {string} the filename
 @constructor
Constructor for file persistence handle uses user home directory + <sAppName > + / + sFileName for persitence @param sAppName { string } the application name @param sFileName { string } the filename @constructor