src/server/data-loader.js
/**
 * Scan the contents data_directory for JSON files
 * @private
 * @returns {string[]} Absolute path to the contents of data_directory. Non-JSON files are ignored
 */
Scan the contents data_directory for JSON files
@private
@returns {string[]} Absolute path to the contents of data_directory. Non-JSON files are ignored
Scan the contents data_directory for JSON files @private @returns { string [] } Absolute path to the contents of data_directory . Non - JSON files are ignored
function __scanDataDirectory()
{
    let dataFiles = fs.readdirSync(data_directory);
    for(let i = 0; i < dataFiles.length; i++)
    {
        if(path.extname(dataFiles[i]) == ".json")
            dataFiles[i] = path.resolve(data_directory, dataFiles[i]);
    }
    return dataFiles;
}
function __scanDataDirectory ( ) { let dataFiles = fs . readdirSync ( data_directory ) ; for ( let i = 0 ; i < dataFiles . length ; i ++ ) { if ( path . extname ( dataFiles [ i ] ) == ".json" ) dataFiles [ i ] = path . resolve ( data_directory , dataFiles [ i ] ) ; } return dataFiles ; }
Scan the contents data_directory for JSON files
 @private
 @returns {string[]} Absolute path to the contents of data_directory.
Scan the contents data_directory for JSON files @private @returns { string [] } Absolute path to the contents of data_directory .
// Skip non-JSON files