Stackedit/public/res/fileSystem.js

15 lines
372 B
JavaScript
Raw Normal View History

2013-06-16 10:47:35 +00:00
define([
2013-06-19 20:33:46 +00:00
"underscore",
2013-06-16 10:47:35 +00:00
"utils",
"classes/FileDescriptor",
"storage",
2013-06-19 20:33:46 +00:00
], function(_, utils, FileDescriptor) {
2013-06-16 10:47:35 +00:00
var fileSystem = {};
2013-06-19 20:33:46 +00:00
// Retrieve file descriptors from localStorage
2013-06-16 10:47:35 +00:00
_.each(utils.retrieveIndexArray("file.list"), function(fileIndex) {
2013-06-19 20:33:46 +00:00
fileSystem[fileIndex] = new FileDescriptor(fileIndex);
2013-06-16 10:47:35 +00:00
});
return fileSystem;
});