Home > Delphi, JavaScript, nodeJS, Object Pascal, OP4JS, Smart Mobile Studio > Virtual Filesystem in Smart Mobile Studio

Virtual Filesystem in Smart Mobile Studio

February 2, 2015 Leave a comment Go to comments

Storage and HTML5, say what you will but it’s not exactly optimal. In essence storage can be reduced to “read everything, but unless you have special access rights, you cant touch a single file”. Well this is true, a hundred-fold for mobile developers.

In order to make things easy to work with QTX will introduce what is known as a virtual filesystem. In short it allows you to save X number of files, whatever they may be, into a single JSON serializable object. This object can then be stored either in local-storage, global-storage and even a database.

While it doesn’t change the fact that you can’t touch the filesystem from the browser, it will at least make it easy to generate and save data when your application runs. It will be especially useful for mobile development since phonegap removes the size limitations desktop browser enforce.

Also, making a “filesystem editor” program which allows you to create package files (think zip files here) which can be included with your smart applications as a resource — well, it wont be hard to achieve. And it doesnt violate any browser rules either, as long as you understand that you cant write to it, unless you store it in local-storage or some other browser friendly target that is.

Practical uses?

The core of the system is abstract, meaning that it can be made to read and write data to anything. Why not code an FTP client using web-sockets? Then a virtual filesystem class will be very handy indeed!

Or perhaps you want to interface with dropbox or your google drive? Again being able to plug a virtual filesystem on top of such a system can be valuable.

The code

If you want to check out the code, head over to google code and preview qtx.storage.pas. It’s still early in development but it will be finished quite soon.

 

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: