Over a million developers have joined DZone.

Simplify and UNIXify the HTML5 Filesystem API with filer.js

· Web Dev Zone

Start coding today to experience the powerful engine that drives data application’s development, brought to you in partnership with Qlik.

One of the more ambitious low-level web standards presently under development is the Filesystem API, currently in W3C Working Draft status.

Rather than creating its own local storage space, an application using the Filesystem API can navigate the user's pre-existing local filesystem, within a user-defined sandbox -- thus, like many of these new web technologies, continuing to dissolve the web/local barrier.

Filesystem-appropriately, the API is long and complex.

So Eric Bidelman wrote a wrapper, filer.js, to map some basic filesystem functionality to shorter-syntax and -- here's the awesome rub -- familiar UNIX commands.

From Eric's release announcement

Unlike other libraries [1, 2], filer.js takes a different approach and incorporates some lessons I learned while implementing the Google Docs Python client library. Namely, the library resuses familiar UNIX commands (cp, mv, rm) for its API. My goal was to a.) make the HTML5 API more approachable for developers that have done file I/O in other languages, and b.) make repetitive operations (renaming, moving, duplicating) easier.

That's pretty sweet, I'd say. Why wrap into something just simpler, when you can map onto something you already know?

Check out Eric's announcement, or the github project itself. And long live ls!

Create data driven applications in Qlik’s free and easy to use coding environment, brought to you in partnership with Qlik.


Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}