mishoo/ymacs — pull request #9 by feeley (2014-11-03 22:59:57+00:00)
Title: use a continuation passing style interface for the filesystem operations

The changes I have make add an abstraction for filesystems operations (fs_getFileContents, etc) to allow asynchronous access to the filesystem (for example to access files using XMLHttpRequest). The new filesystem operations are modelled on the local storage operations, but they use a continuation passing style interface.

Currently, the new filesystem operations simply call the corresponding local storage operations, so there is no change in behaviour from before. However, the fs_XXX methods in ymacs.js could be redefined to do asynchronous access. To test the asynchronous API, uncomment the lines marked "uncomment to make it async, for testing".

I have also added keybindings related to files (i.e. C-x C-f, C-x C-w, C-x C-s).