ABSTRACT

The biggest difference between JavaScript and most other programming languages is that many operations in JavaScript are asynchronous. Its designers didn't want browsers to freeze while waiting for data to arrive or for users to click on things, so operations that might be slow are implemented by describing now what to do later. And since anything that touches the hard drive is slow from a processor's point of view, implements filesystem operations the same way. We need to understand how these work in order to debug things when they go wrong, and also need to understand how to manipulate files and directory programmatically, so this chapter explores how to do the latter using the former.