Sunday, April 24, 2011

Google Chrome's requestFileSystem API

I've needed to dump database from Chrome extension and walked to requestFileSystem API. This API described quite detailed on HTML5 Rocks, but it gave no idea where my files are located on my hard drive. Process Monitor gaved me directions, and there it is. For each application, would it be site or extension, Google Chrome creates subdir in your %LOCALAPPDATA%\Google\Chrome\User Data\Default\FileSystem (on Windows (I'll give path for Linux later)). This subdir is named after application's URL, including protocol with slashes and colons replaced with underscores. For it looks this way: http_www.html5rocks.com_0 Inside URL-named folder one can find one or two folders: Persistent or Temporary or both, which depends on type of access given application used. Inside each of them there is a directory with some kind of hash in name. And that hashed-name directory is root directory for your application's filesystem.

Thursday, April 21, 2011

e-mail validation

Developers should always remember that e-mail adressess may contain dot before @. For example, one of my e-mails is I've created it in late 2004 and I periodically still got messages like „invalid e-mail“.