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.

3.1. Understanding synchronicity

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.

3.2. Getting references to files and directories

 
 
 
 

3.3. Listing directory contents

 
 
 
 

3.4. Creating directories

 

3.5. Removing directories and files

 
 
 

3.6. Copying and moving files and directories

 
 
 

3.7. Reading from and writing to files

 
 
 

3.8. Reading and writing music playlists

 
 

3.9. Storing data securely

 
 
 

3.10. Writing to files with AirTube

 
 
 

3.11. Summary

 
 
 
 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage