Chapter 3. File system integration
This chapter covers
- Retrieving directory listings
- Moving and copying files and directories
- Reading from files
- Writing to files
This chapter is practically brimming over with information, because there’s a tremendous amount you can do with the file system capabilities in AIR. In fact, you’re limited in large part only by your imagination. We have a lot of ground to cover in this chapter, including the following:
- Referencing files and directories
- Getting directory listings
- Copying and moving files and directories
- Deleting files and directories
- Reading from files
- Writing to files
We’re going to tackle all these topics in detail, with lots of examples you can use to follow along. Before long you’ll be an old pro at working with the file system.
Before we get to the core file system skills, we’re going to talk about the important topic of synchronous and asynchronous programming. This is an important concept for much of AIR programming, and especially important when working with the file system.
The concepts of synchronous and asynchronous programming are important when building AIR applications. These concepts aren’t unique to working with the file system, but this is the first point in the book when these concepts are going to be important, so we’ll cover the topic here.