Live data from Hacker News

Introducing filer.js

ericbidelman.tumblr.com

11–15 of 15 posts

Re: Introducing filer.js

#11

Earlier quoted context omitted.

"copy" is straightforward, how about to create a directory? Is it "create", "makeDirectory", etc? Even for "copy", which order to the arguments go? This has historically been ambiguous. If you base it on the Unix standard, you get that for free. I'd rather pick one standard many people know than just choose yet another arbitrary set of API signatures. So it really comes down to Unix versus MS-DOS, and I think most pr…

This, I think, would be totally fair enough, but I think you'd get a disparity between the 'standard' and the implementation. You mention arguments. In PHP, for example, you have `mkdir`, and `rmdir`, and all that. You supply the file or directory string as the first argument, and a limited subset of options as the rest. In Unix you have `mkdir`, but you supply the flags before the name of the directory to create. Fu…

>>> You mention arguments. In PHP, for example, you have `mkdir`, and `rmdir`, and all that. You supply the file or directory string as the first argument, and a limited subset of options as the rest.

http://linux.die.net/man/2/mkdir

http://php.net/manual/en/function.mkdir.php

... they look similar enough to me. The PHP function has some additional tricks, such as creating all parent directories up to the specified path.

http://linux.die.net/man/2/rmdir

http://php.net/manual/en/function.rmdir.php

In this case, the POSIX/C function accepts only one argument. So does PHP, for common usage.

>>> In Unix you have `mkdir`, but you supply the flags before the name of the directory to create.

I think you might be confusing the programs mkdir and rmdir (which don't care much about argument order) with the functions mkdir and rmdir (which, similar to filer.js functions, are part of the API).

Re: Introducing filer.js

#14
From comments: "How is filer.js better or different than the HTML5 Filesystem API?". I'm curious what the answer would be - but perhaps more importantly, the flip side - why does HTML 5 do such a bad job that filer.js has a reason to exist?

Re: Introducing filer.js

#15
post #4

Earlier quoted context omitted.

This is a perfect compliment to something like jstorage though. html5 localstorage gives about 5mb of data stored as text (~5million characters). But chrome uses UTF-16 encoding giving you only about ~2.7 million characters of storage. Effectively halving the size of the total storage. Something like this might work well in place of jstorage on chrome.

Isn't there a binary storage option? I don't wanna Base64 encode everything... Seems ridiculous.

Nope. Probably something to do with security. But everything needs to be string. It works well for everything other than images.
Post reply on HN