• Type: Story
    • Status: Open
    • Priority: Low
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: TiAPI


      We need to rework the FileSystem API, perhaps as a module

      The biggest problem with the FileSystem API is parity. You can't even tell if something is a file or a directory on iOS. As far as Mobile Web is concerned, the FileSystem architecture supports multiple backends. The one and only backend today is local storage. I'd like to add a IndexedDB backed storage system, but IndexedDB is completely async, so it's not compatible with the Titanium FileSystem API.

      We should make it like node.js. This means Ti.FileSystem goes bye bye. You would require('fs') to get the FileSystem API. We should expose methods that are async friendly. Doing it this way allows us to:

      1. ship both the existing FileSystem API and the new one
      2. pave the way for ripping modules out of the Titanium namespace
      3. introduce async versions of filesystem functions
      4. mimic node.js's FileSystem API

      On Mobile Web, it will be tricky/impossible to have a hybrid filesystem layer where local storage is used for synchronous api calls and IndexedDB is used for async calls. If the backend is IndexedDB, we could just have all sync functions fail in combination with the code processor detecting sync filesystem calls being made when IndexedDB is the backend.


          Issue Links



              • Assignee:
                cbarber Chris Barber
                ingo Ingo Muschenetz
              • Watchers:
                2 Start watching this issue


                • Created:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    Sync status:
                    Last received:
                    Last sent:

                    Git Integration