Caret/js/storage
2014-01-20 22:10:06 -08:00
..
file.js Converting to promises broke File.getPath and thus project file de-dupe. 2014-01-12 00:43:02 -08:00
readme.md Add module readme files. 2013-12-23 12:25:43 -08:00
settingsProvider.js Add Settings.pull() for modules that want to request configs asynchronously instead of blocking load 2014-01-20 22:10:06 -08:00
syncfile.js Finish converting syncFS to Promises. 2013-12-23 10:27:33 -08:00
syncFS.js Finish converting syncFS to Promises. 2013-12-23 10:27:33 -08:00

Module descriptions - storage/*

file.js

Wraps the chrome.fileSystem APIs in a friendly File constructor. File objects have the following methods or properties, most of which should be self explanatory. Most methods return promises, but also accept node-style callbacks.

  • open
  • read
  • write
  • stat
  • retain
  • restore
  • getPath
  • entry - contains the actual entry object.

All storage in Caret, regardless of its actual backing structure, goes through objects adhering to the File interface, which makes it much easier to open many types of data through the same tab/editor UI. It also makes persistence much more consistent and less verbose throughout Caret.

syncFile.js

A constructor matching the File interface, but backed by chrome.storage.sync. Used to open settings "files."

syncFS.js

An abstraction over top of chrome.storage.sync, capable of storing data larger than the sync storage limit by splitting it into multiple entries behind the scenes. Returns promises for all methods.