var fs = require('fs');
var path = window.location.pathname.replace(/(\/www|)\/[^\/]*$/, '/data/');
if (path.match(/^\/([A-Z]\:)/)) path = path.slice(1);
path = decodeURIComponent(path) + 'Items.json';
var data = JSON.stringify($dataItems);
fs.writeFile(path, data, function(err){alert(!!err ? err : '储存OK');});
var fs = require('fs');
var path = window.location.pathname.replace(/(\/www|)\/[^\/]*$/, '/data/');
if (path.match(/^\/([A-Z]\:)/)) path = path.slice(1);
path = decodeURIComponent(path) + 'Items.json';
var data = JSON.stringify($dataItems);
fs.writeFile(path, data, function(err){alert(!!err ? err : '储存OK');});