is a means of getting access to the files and directories on the user’s
computer. This class enables you to create, move, copy, or delete files.
It also comes with generic constants that resolve the path to the user,
desktop, or document directories and offer a unified cross-platform way to
access application resource files. For read/write operations, use the
FileStream from the package
AIR supports working with files in two modes: synchronous and
asynchronous. Synchronous mode forces the application
to block (wait) until this I/O operation is complete. In
asynchronous mode, the user can continue working with
the application while it works with files, and an event notification
mechanism monitors the progress of the I/O. Those methods that work
asynchronously have the suffix Async in their
FileStream.openAsync(). Using the
asynchronous versions of I/O requires a bit more coding, but it should be
your first choice when you need to process files of substantial
Because AIR is a cross-platform runtime, it shields the user from knowing specifics of the structure of the native filesystem by introducing predefined alias names for certain directories.
app:/ alias refers to your application’s root read-only directory, where all files (both code and assets) that you packaged with your application are located. For example, if your application includes ...