Search code examples
iosfilesystemsvirtual

Virtual File System for iOS


I was wondering if one can make a virtual file system for iOS. I am trying to make a mobile version of a userspace filesystem like macfuse for Mac OS. Any suggestions would be appreciated!

I am interested in making something like dropbox where you don't actually store the files locally. I want to obtain files from dropbox and display it to user. Is this possible?


Solution

  • There is no way to actually mount a new file system. Fortunately, that is not necessary for your app to use the "Open With" menu to provide data to other apps.

    When your app passed a file to another app, the file is copied into the target app's Inbox directory. This means it doesn't matter where the file was originally, or how it was accessed.

    The simplest mechanism to access files would be to implement a custom subclass of NSURLProtocol for each filesystem you want to mount. If you implement it correctly, all the remaining operations should be handled for you.