Understanding the Files API
The PhoneGap Files API is an implementation of two different W3C APIs, the Directories and System API and the File API (you can find the complete specifications on the W3C website at http://www.w3.org/TR/file-system-api/ and http://www.w3.org/TR/file-upload.) The PhoneGap Files API is not a complete implementation of the W3C specification; the missing piece is the synchronous filesystem interface implementation. Asynchronous JavaScript APIs are a bit more complex to use because you have to work with multiple nested functions but this should not be a big issue; in fact, it's something web developers are all too familiar with.
Note
The main difference between asynchronous and synchronous JavaScript execution is that in the first case, you can run several processes simultaneously and avoid "freezing" the user interface. With the introduction of web workers in JavaScript, it's possible to avoid this issue but this is totally beyond the scope for this book; you can find...