<?xml version="1.0"?>
<apiPackage id="flash.filesystem"><apiName>flash.filesystem</apiName><apiDetail/><apiClassifier id="flash.filesystem:FileStream"><apiName>FileStream</apiName><shortdesc>
 A FileStream object is used to read and write files.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiStatic/><apiBaseInterface>flash.utils:IDataInput</apiBaseInterface><apiBaseInterface>flash.utils:IDataOutput</apiBaseInterface><apiBaseClassifier>flash.events:EventDispatcher</apiBaseClassifier></apiClassifierDef><apiDesc>
 A FileStream object is used to read and write files. Files can be opened synchronously by calling the
 <codeph>open()</codeph> method or asynchronously by calling the <codeph>openAsync()</codeph> method.
 
 <p>The advantage of opening files asynchronously is that other code can execute while Adobe AIR
 runs read and write processes in the background. When opened asynchronously, <codeph>progress</codeph> events 
 are dispatched as operations proceed.</p>
 
 <p>A File object that is opened synchronously behaves much like a ByteArray object; a file opened asynchronously behaves 
 much like a Socket or URLStream object. When a File object is opened synchronously, the caller pauses while 
 the requested data is read from or written to the underlying file. When opened asynchronously, any data 
 written to the stream is immediately buffered and later written to the file.</p>
 
 <p>Whether reading from a file synchronously or asynchronously, the actual read methods are synchronous. 
 In both cases they read from data that is currently "available." The difference is that when reading 
 synchronously all of the data is available at all times, and when reading asynchronously data becomes 
 available gradually as the data streams into a read buffer. Either way, the data that can be synchronously 
 read at the current moment is represented by the <codeph>bytesAvailable</codeph> property.</p>
 
 <p>An application that is processing asynchronous input typically registers for <codeph>progress</codeph> events 
 and consumes the data as it becomes available by calling read methods. Alternatively, an application can 
 simply wait until all of the data is available by registering for the <codeph>complete</codeph> event and 
 processing the entire data set when the <codeph>complete</codeph> event is dispatched. </p>
 
 </apiDesc></apiClassifierDetail><adobeApiEvent id="flash.filesystem:FileStream_flash.events.Event.COMPLETE_complete"><apiName>complete</apiName><shortdesc>
 Signals that the end of the stream has been reached.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><adobeApiEventDetail><adobeApiEventDef><apiEventType>flash.events.Event.COMPLETE</apiEventType><adobeApiEventClassifier>flash.events.Event</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>
 Signals that the end of the stream has been reached.
 
 </apiDesc></adobeApiEventDetail><related-links><link href="flash.filesystem.xml#FileStream/position"><linktext>position</linktext></link></related-links></adobeApiEvent><adobeApiEvent id="flash.filesystem:FileStream_flash.events.OutputProgressEvent.OUTPUT_PROGRESS_outputProgress"><apiName>outputProgress</apiName><shortdesc>
 Signals that buffered data has been written to the file.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><adobeApiEventDetail><adobeApiEventDef><apiEventType>flash.events.OutputProgressEvent.OUTPUT_PROGRESS</apiEventType><adobeApiEventClassifier>flash.events.OutputProgressEvent</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>
 Signals that buffered data has been written to the file.
 
 </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.filesystem:FileStream_flash.events.ProgressEvent.PROGRESS_progress"><apiName>progress</apiName><shortdesc>
 Signals the availability of new data on the stream.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><adobeApiEventDetail><adobeApiEventDef><apiEventType>flash.events.ProgressEvent.PROGRESS</apiEventType><adobeApiEventClassifier>flash.events.ProgressEvent</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>
 Signals the availability of new data on the stream.
 
 </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.filesystem:FileStream_flash.events.IOErrorEvent.IO_ERROR_ioError"><apiName>ioError</apiName><shortdesc>
 Indicates that an error occurred during an asynchronous file I/O operation.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><adobeApiEventDetail><adobeApiEventDef><apiEventType>flash.events.IOErrorEvent.IO_ERROR</apiEventType><adobeApiEventClassifier>flash.events.IOErrorEvent</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>
 Indicates that an error occurred during an asynchronous file I/O operation.
 
 </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.filesystem:FileStream_flash.events.Event.CLOSE_close"><apiName>close</apiName><shortdesc>
 Indicates that the stream has been
 closed by an explicit call to the close() method.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><adobeApiEventDetail><adobeApiEventDef><apiEventType>flash.events.Event.CLOSE</apiEventType><adobeApiEventClassifier>flash.events.Event</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>
 Indicates that the stream has been
 closed by an explicit call to the <codeph>close()</codeph> method.
 
 </apiDesc></adobeApiEventDetail><related-links><link href="flash.filesystem.xml#FileStream/close()"><linktext>close()</linktext></link></related-links></adobeApiEvent><apiConstructor id="flash.filesystem:FileStream:FileStream"><apiName>FileStream</apiName><shortdesc>
	 Creates a FileStream object.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/></apiConstructorDef><apiDesc>
	 Creates a FileStream object. 
	 Use the <codeph>open()</codeph>
	 or <codeph>openAsync()</codeph> method to open a file.
	 
	 </apiDesc></apiConstructorDetail><related-links><link href="flash.filesystem.xml#FileStream/open()"><linktext>open()</linktext></link><link href="flash.filesystem.xml#FileStream/openAsync()"><linktext>openAsync()</linktext></link></related-links></apiConstructor><apiOperation id="flash.filesystem:FileStream:close"><apiName>close</apiName><shortdesc>
	 Closes the FileStream object.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiType value="void"/></apiReturn></apiOperationDef><apiDesc>
	 Closes the FileStream object. 
	 
	 <p>You cannot read or write any data after you call the <codeph>close()</codeph> method.  If the file 
	 was opened asynchronously (the FileStream object used the <codeph>openAsync()</codeph> method to open the file), 
	 calling the <codeph>close()</codeph> method causes the object to dispatch the <codeph>close</codeph> event. </p>
	 
	 <p>Closing the application automatically closes all files associated with FileStream objects in the application.
	 However, it is best to register for a <codeph>closed</codeph> event on all FileStream objects opened asynchronously 
	 that have pending data to write, before closing the application (to ensure that data is written).</p>
	 
	 <p>You can reuse the FileStream object by calling the <codeph>open()</codeph> or the <codeph>openAsync()</codeph> 
	 method.  This closes any file associated with the FileStream object, but the object does not dispatch the 
	 <codeph>close</codeph> event.</p>
	 
	 <p>For a FileStream object opened asynchronously (by using the <codeph>openAsync()</codeph> method), 
	 even if you call the <codeph>close()</codeph> event for a FileStream object and delete properties and variables that
	 reference the object, the FileStream object is not garbage collected as long as there are pending operations and 
	 event handlers are registered for their completion. In particular, an otherwise unreferenced FileStream object 
	 persists as long as any of the following are still possible: </p>
	 
	 <ul>
	 
	 	<li>For file reading operations, the end of the file has not been reached (and the <codeph>complete</codeph>
	 event has not been dispatched). </li>
	 
	 	<li>Output data is still available to written, and output-related events (such as the <codeph>outputProgress</codeph>
	 event or the <codeph>ioError</codeph> event) have registered event listeners. </li>
	 
	 </ul>
	 
	 </apiDesc><example conref="examples\FileStream.close.1.as">     The following code opens a FileStream object <i>asynchronously</i> and writes a text file named 
 test.txt to the Apollo Test subdirectory of the user's documents directory. A call to the <codeph>close()</codeph>  
 method of the FileStream object closes the file when the data is written. 
<codeblock>
import flash.filesystem.*;
import flash.events.Event;
            
var file:File = File.documentsDirectory;
file = file.resolvePath("Apollo Test/test.txt");
var fileStream:FileStream = new FileStream();
fileStream.openAsync(file, FileMode.WRITE);
fileStream.writeUTFBytes("Hello");
fileStream.addEventListener(Event.CLOSE, fileClosed);
fileStream.close();

function fileClosed(event:Event):void {
    trace("closed");
}            
</codeblock></example><example conref="examples\FileStream.close.2.as">     The following code opens a FileStream object <i>synchronously</i> and writes a text file named 
 test.txt to the Apollo Test subdirectory of the user's documents directory. A call to the <codeph>close()</codeph> 
 method of the FileStream object closes the file when the data is written.
<codeblock>
import flash.filesystem.*;
            
var file:File = File.documentsDirectory;
file = file.resolvePath("Apollo Test/test.txt");
var fileStream:FileStream = new FileStream();
fileStream.open(file, FileMode.WRITE);
fileStream.writeUTF("Hello");
fileStream.close();
</codeblock></example></apiOperationDetail><related-links><link href="flash.filesystem.xml#FileStream/open()"><linktext>open()</linktext></link><link href="flash.filesystem.xml#FileStream/event:close"><linktext>close event</linktext></link></related-links><adobeApiEvent id="flash.filesystem:FileStream:close_close"><apiName>close</apiName><prolog/><adobeApiEventDetail><adobeApiEventDef><adobeApiEventClassifier>flash.events:Event</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>The file, which was opened asynchronously, is closed.
	 
	 </apiDesc></adobeApiEventDetail><shortdesc>The file, which was opened asynchronously, is closed.</shortdesc></adobeApiEvent></apiOperation><apiOperation id="flash.filesystem:FileStream:open"><apiName>open</apiName><shortdesc>
	 Opens the FileStream object synchronously, pointing to the file specified by the file parameter.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiException><apiDesc>The file does not exist; you do not have adequate permissions to 
	 open the file; you are opening a file for read access, and you do not have read permissions;
	 or you are opening a file for write access, and you do not have write permissions. 
	 
	 </apiDesc><apiItemName>IOError</apiItemName><apiOperationClassifier>flash.errors:IOError</apiOperationClassifier></apiException><apiException><apiDesc>The file location is in the application directory, and the <codeph>fileMode</codeph>
	 parameter is set to "append", "update", or "write" mode. 
	 
	 </apiDesc><apiItemName>SecurityError</apiItemName><apiOperationClassifier>SecurityError</apiOperationClassifier></apiException><apiReturn><apiType value="void"/></apiReturn><apiParam><apiItemName>file</apiItemName><apiOperationClassifier>flash.filesystem:File</apiOperationClassifier><apiDesc>The File object specifying the file to open.
	 
	 </apiDesc></apiParam><apiParam><apiItemName>fileMode</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiDesc>A string from the FileMode class that defines the capabilities of the FileStream, such as
	 the ability to read from or write to the file.
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Opens the FileStream object synchronously, pointing to the file specified by the <codeph>file</codeph> parameter. 
	 
	 <p>If the FileStream object is already open, calling the method closes the file before opening
	 and no further events (including <codeph>close</codeph>) are delivered for the previously opened file.</p>
	 
	 <p>On systems that support file locking, a file opened in "write" or "update" mode (<codeph>FileMode.WRITE</codeph>
	 or <codeph>FileMode.UPDATE</codeph>) is not readable until it is closed.</p>
	 
	 <p>Once you are done performing operations on the file, call the <codeph>close()</codeph> method of the FileStream
	 object. Some operating systems limit the number of concurrently open files.</p>
	 
	 </apiDesc><example conref="examples\FileStream.open.1.as"> The following code shows how to synchronously open a test.txt file in the
 Apollo Test subdirectory of the user's documents directory and then read the file into a string, 
 using the system character set as the text encoding.
<codeblock>
import flash.filesystem.*;

var file:File = File.documentsDirectory;
file = file.resolvePath("Apollo Test/test.txt");
var fileStream:FileStream = new FileStream();
fileStream.open(file, FileMode.READ);
var str:String = fileStream.readMultiByte(file.size, File.systemCharset);
trace(str);
fileStream.close();
</codeblock></example></apiOperationDetail><related-links><link href="flash.filesystem.xml#FileStream/close()"><linktext>close()</linktext></link><link href="flash.filesystem.xml#File"><linktext>File</linktext></link><link href="flash.filesystem.xml#FileMode"><linktext>FileMode</linktext></link></related-links></apiOperation><apiOperation id="flash.filesystem:FileStream:openAsync"><apiName>openAsync</apiName><shortdesc>
	 Opens the FileStream object asynchronously, pointing to the file specified by the file parameter.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiException><apiDesc>The file location is in the application directory, and the <codeph>fileMode</codeph>
	 parameter is set to "append", "update", or "write" mode. 
	 
	 </apiDesc><apiItemName>SecurityError</apiItemName><apiOperationClassifier>SecurityError</apiOperationClassifier></apiException><apiReturn><apiType value="void"/></apiReturn><apiParam><apiItemName>file</apiItemName><apiOperationClassifier>flash.filesystem:File</apiOperationClassifier><apiDesc>The File object specifying the file to open.
	 
	 </apiDesc></apiParam><apiParam><apiItemName>fileMode</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiDesc>A string from the FileMode class that defines the capabilities of the FileStream, such as
	 the ability to read from or write to the file.
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Opens the FileStream object asynchronously, pointing to the file specified by the <codeph>file</codeph> parameter. 
	 
	 <p>If the FileStream object is already open, calling the method closes the file before opening
	 and no further events (including <codeph>close</codeph>) are delivered for the previously opened file.</p>
	 
	 <p>If the <codeph>fileMode</codeph> parameter is set to <codeph>FileMode.READ</codeph> or 
	 <codeph>FileMode.UPDATE</codeph>, AIR reads data into the input buffer as soon as the file is opened,
	 and <codeph>progress</codeph> and <codeph>open</codeph> events are dispatched as the data is read to
	 the input buffer.</p>
	 
	 <p>On systems that support file locking, a file opened in "write" or "update" mode (<codeph>FileMode.WRITE</codeph>
	 or <codeph>FileMode.UPDATE</codeph>) is not readable until it is closed.</p>
	 
	 <p>Once you are done performing operations on the file, call the <codeph>close()</codeph> method of the FileStream
	 object. Some operating systems limit the number of concurrently open files.</p>
	 
`	 </apiDesc><example conref="examples\FileStream.openAsync.1.as"> The following code shows how to asynchronously open a test.txt file in the
 Apollo Test subdirectory of the user's documents directory and then read the file into a string, 
 using the system character set as the text encoding.
<codeblock>
import flash.filesystem.*;
import flash.events.Event;

var file:File = File.documentsDirectory;
file = file.resolvePath("Apollo Test/test.txt");
var fileStream:FileStream = new FileStream();
fileStream.addEventListener(Event.COMPLETE, fileCompleteHandler)
fileStream.openAsync(file, FileMode.READ);

function fileCompleteHandler(event:Event):void {
    var str:String = fileStream.readMultiByte(fileStream.bytesAvailable, File.systemCharset);
    trace(str);
    fileStream.close();
}
</codeblock></example></apiOperationDetail><related-links><link href="flash.filesystem.xml#FileStream/close()"><linktext>close()</linktext></link><link href="flash.filesystem.xml#FileStream/event:complete"><linktext>complete event</linktext></link><link href="flash.filesystem.xml#FileStream/event:ioError"><linktext>ioError event</linktext></link><link href="flash.filesystem.xml#FileStream/event:progress"><linktext>progress event</linktext></link><link href="flash.filesystem.xml#FileMode"><linktext>FileMode</linktext></link></related-links><adobeApiEvent id="flash.filesystem:FileStream:openAsync_ioError"><apiName>ioError</apiName><prolog/><adobeApiEventDetail><adobeApiEventDef><adobeApiEventClassifier>flash.events:IOErrorEvent</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>The file does not exist; you do not have adequate permissions to 
	 open the file; you are opening a file for read access, and you do not have read permissions;
	 or you are opening a file for write access, and you do not have write permissions. 
	 
	 </apiDesc></adobeApiEventDetail><shortdesc>The file does not exist; you do not have adequate permissions to 
	 open the file; you are opening a file for read access, and you do not have read permissions;
	 or you are opening a file for write access, and you do not have write permissions.</shortdesc></adobeApiEvent><adobeApiEvent id="flash.filesystem:FileStream:openAsync_progress"><apiName>progress</apiName><prolog/><adobeApiEventDetail><adobeApiEventDef><adobeApiEventClassifier>flash.events:ProgressEvent</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>Dispatched as data is read to the input buffer. (The file must be opened  
	 with the <codeph>fileMode</codeph> parameter set to <codeph>FileMode.READ</codeph> or 
	 <codeph>FileMode.UPDATE</codeph>.)
	 
	 </apiDesc></adobeApiEventDetail><shortdesc>Dispatched as data is read to the input buffer.</shortdesc></adobeApiEvent><adobeApiEvent id="flash.filesystem:FileStream:openAsync_complete"><apiName>complete</apiName><prolog/><adobeApiEventDetail><adobeApiEventDef><adobeApiEventClassifier>flash.events:Event</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>The file data has been read to the input buffer. (The file must be opened with 
	 the <codeph>fileMode</codeph> parameter set to <codeph>FileMode.READ</codeph> or 
	 <codeph>FileMode.UPDATE</codeph>.)
	 
	 </apiDesc></adobeApiEventDetail><shortdesc>The file data has been read to the input buffer.</shortdesc></adobeApiEvent></apiOperation><apiOperation id="flash.filesystem:FileStream:readBoolean"><apiName>readBoolean</apiName><shortdesc>
	
	 Reads a Boolean value from the file stream, byte stream, or byte array.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiException><apiDesc>The file has not been opened; the file has been opened, but it was not opened with
	read capabilities; or for a file that has been opened for synchronous operations (by using the 
	<codeph>open()</codeph> method), the file cannot be read (for example, because the file is missing).
	
	</apiDesc><apiItemName>IOError</apiItemName><apiOperationClassifier>flash.errors:IOError</apiOperationClassifier></apiException><apiException><apiDesc>The position specfied for reading data exceeds the number of bytes available 
	(specified by the <codeph>bytesAvailable</codeph> property).
	
	</apiDesc><apiItemName>EOFError</apiItemName><apiOperationClassifier>flash.errors:EOFError</apiOperationClassifier></apiException><apiReturn><apiDesc>A Boolean value, <codeph>true</codeph> if the byte is nonzero,
	 <codeph>false</codeph> otherwise.
	 </apiDesc><apiOperationClassifier>Boolean</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	
	 Reads a Boolean value from the file stream, byte stream, or byte array. A single byte is read
	 and <codeph>true</codeph> is returned if the byte is nonzero,
	 <codeph>false</codeph> otherwise.
	 </apiDesc></apiOperationDetail><adobeApiEvent id="flash.filesystem:FileStream:readBoolean_ioError"><apiName>ioError</apiName><prolog/><adobeApiEventDetail><adobeApiEventDef><adobeApiEventClassifier>flash.events:IOErrorEvent</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>The file cannot be read or the file is not open. This event is dispatched 
	only for files opened for asynchronous operations (by using the <codeph>openAsync()</codeph> method).
	
	</apiDesc></adobeApiEventDetail><shortdesc>The file cannot be read or the file is not open.</shortdesc></adobeApiEvent></apiOperation><apiOperation id="flash.filesystem:FileStream:readByte"><apiName>readByte</apiName><shortdesc>
	
	 Reads a signed byte from the file stream, byte stream, or byte array.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiException><apiDesc>The file has not been opened; the file has been opened, but it was not opened with
	read capabilities; or for a file that has been opened for synchronous operations (by using the 
	<codeph>open()</codeph> method), the file cannot be read (for example, because the file is missing).
	
	</apiDesc><apiItemName>IOError</apiItemName><apiOperationClassifier>flash.errors:IOError</apiOperationClassifier></apiException><apiException><apiDesc>The position specfied for reading data exceeds the number of bytes available 
	(specified by the <codeph>bytesAvailable</codeph> property).
	
	</apiDesc><apiItemName>EOFError</apiItemName><apiOperationClassifier>flash.errors:EOFError</apiOperationClassifier></apiException><apiReturn><apiDesc>The returned value is in the range -128 to 127.
	 </apiDesc><apiOperationClassifier>int</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	
	 Reads a signed byte from the file stream, byte stream, or byte array.
	 </apiDesc></apiOperationDetail><adobeApiEvent id="flash.filesystem:FileStream:readByte_ioError"><apiName>ioError</apiName><prolog/><adobeApiEventDetail><adobeApiEventDef><adobeApiEventClassifier>flash.events:IOErrorEvent</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>The file cannot be read or the file is not open. This event is dispatched 
	only for files opened for asynchronous operations (by using the <codeph>openAsync()</codeph> method).
	
	</apiDesc></adobeApiEventDetail><shortdesc>The file cannot be read or the file is not open.</shortdesc></adobeApiEvent></apiOperation><apiOperation id="flash.filesystem:FileStream:readBytes"><apiName>readBytes</apiName><shortdesc>
	
	 Reads the number of data bytes, specified by the length parameter, 
	 from the file stream, byte stream, or byte array.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiException><apiDesc>The file has not been opened; the file has been opened, but it was not opened with
	read capabilities; or for a file that has been opened for synchronous operations (by using the 
	<codeph>open()</codeph> method), the file cannot be read (for example, because the file is missing).
	
	</apiDesc><apiItemName>IOError</apiItemName><apiOperationClassifier>flash.errors:IOError</apiOperationClassifier></apiException><apiException><apiDesc>The position specfied for reading data exceeds the number of bytes available 
	(specified by the <codeph>bytesAvailable</codeph> property).
	
	</apiDesc><apiItemName>EOFError</apiItemName><apiOperationClassifier>flash.errors:EOFError</apiOperationClassifier></apiException><apiReturn><apiType value="void"/></apiReturn><apiParam><apiItemName>bytes</apiItemName><apiOperationClassifier>flash.utils:ByteArray</apiOperationClassifier><apiDesc>The <codeph>ByteArray</codeph> object to read
	              data into.
	 </apiDesc></apiParam><apiParam><apiItemName>offset</apiItemName><apiOperationClassifier>uint</apiOperationClassifier><apiData>0</apiData><apiDesc>The offset into the <codeph>bytes</codeph> parameter at which data
	               read should begin.
	 </apiDesc></apiParam><apiParam><apiItemName>length</apiItemName><apiOperationClassifier>uint</apiOperationClassifier><apiData>0</apiData><apiDesc>The number of bytes to read.  The default value
	               of 0 causes all available data to be read.
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	
	 Reads the number of data bytes, specified by the <codeph>length</codeph> parameter, 
	 from the file stream, byte stream, or byte array. The bytes are read into the 
	 ByteArray objected specified by the <codeph>bytes</codeph> parameter, starting at 
	 the position specified by <codeph>offset</codeph>.
	 </apiDesc></apiOperationDetail><adobeApiEvent id="flash.filesystem:FileStream:readBytes_ioError"><apiName>ioError</apiName><prolog/><adobeApiEventDetail><adobeApiEventDef><adobeApiEventClassifier>flash.events:IOErrorEvent</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>The file cannot be read or the file is not open. This event is dispatched 
	only for files opened for asynchronous operations (by using the <codeph>openAsync()</codeph> method).
	
	</apiDesc></adobeApiEventDetail><shortdesc>The file cannot be read or the file is not open.</shortdesc></adobeApiEvent></apiOperation><apiOperation id="flash.filesystem:FileStream:readDouble"><apiName>readDouble</apiName><shortdesc>
	
	 Reads an IEEE 754 double-precision floating point number from the file stream, byte stream, or byte array.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiException><apiDesc>The file has not been opened; the file has been opened, but it was not opened with
	read capabilities; or for a file that has been opened for synchronous operations (by using the 
	<codeph>open()</codeph> method), the file cannot be read (for example, because the file is missing).
	
	</apiDesc><apiItemName>IOError</apiItemName><apiOperationClassifier>flash.errors:IOError</apiOperationClassifier></apiException><apiException><apiDesc>The position specfied for reading data exceeds the number of bytes available 
	(specified by the <codeph>bytesAvailable</codeph> property).
	
	</apiDesc><apiItemName>EOFError</apiItemName><apiOperationClassifier>flash.errors:EOFError</apiOperationClassifier></apiException><apiReturn><apiDesc>An IEEE 754 double-precision floating point number.
	 </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	
	 Reads an IEEE 754 double-precision floating point number from the file stream, byte stream, or byte array.
	 </apiDesc></apiOperationDetail><adobeApiEvent id="flash.filesystem:FileStream:readDouble_ioError"><apiName>ioError</apiName><prolog/><adobeApiEventDetail><adobeApiEventDef><adobeApiEventClassifier>flash.events:IOErrorEvent</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>The file cannot be read or the file is not open. This event is dispatched 
	only for files opened for asynchronous operations (by using the <codeph>openAsync()</codeph> method).
	
	</apiDesc></adobeApiEventDetail><shortdesc>The file cannot be read or the file is not open.</shortdesc></adobeApiEvent></apiOperation><apiOperation id="flash.filesystem:FileStream:readFloat"><apiName>readFloat</apiName><shortdesc>
	
	 Reads an IEEE 754 single-precision floating point number from the file stream, byte stream, or byte array.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiException><apiDesc>The file has not been opened; the file has been opened, but it was not opened with
	read capabilities; or for a file that has been opened for synchronous operations (by using the 
	<codeph>open()</codeph> method), the file cannot be read (for example, because the file is missing).
	
	</apiDesc><apiItemName>IOError</apiItemName><apiOperationClassifier>flash.errors:IOError</apiOperationClassifier></apiException><apiException><apiDesc>The position specfied for reading data exceeds the number of bytes available 
	(specified by the <codeph>bytesAvailable</codeph> property).
	
	</apiDesc><apiItemName>EOFError</apiItemName><apiOperationClassifier>flash.errors:EOFError</apiOperationClassifier></apiException><apiReturn><apiDesc>An IEEE 754 single-precision floating point number.
	 </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	
	 Reads an IEEE 754 single-precision floating point number from the file stream, byte stream, or byte array.
	 </apiDesc></apiOperationDetail><adobeApiEvent id="flash.filesystem:FileStream:readFloat_ioError"><apiName>ioError</apiName><prolog/><adobeApiEventDetail><adobeApiEventDef><adobeApiEventClassifier>flash.events:IOErrorEvent</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>The file cannot be read or the file is not open. This event is dispatched 
	only for files opened for asynchronous operations (by using the <codeph>openAsync()</codeph> method).
	
	</apiDesc></adobeApiEventDetail><shortdesc>The file cannot be read or the file is not open.</shortdesc></adobeApiEvent></apiOperation><apiOperation id="flash.filesystem:FileStream:readInt"><apiName>readInt</apiName><shortdesc>
	
	 Reads a signed 32-bit integer from the file stream, byte stream, or byte array.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiException><apiDesc>The file has not been opened; the file has been opened, but it was not opened with
	read capabilities; or for a file that has been opened for synchronous operations (by using the 
	<codeph>open()</codeph> method), the file cannot be read (for example, because the file is missing).
	
	</apiDesc><apiItemName>IOError</apiItemName><apiOperationClassifier>flash.errors:IOError</apiOperationClassifier></apiException><apiException><apiDesc>The position specfied for reading data exceeds the number of bytes available 
	(specified by the <codeph>bytesAvailable</codeph> property).
	
	</apiDesc><apiItemName>EOFError</apiItemName><apiOperationClassifier>flash.errors:EOFError</apiOperationClassifier></apiException><apiReturn><apiDesc>The returned value is in the range -2147483648 to 2147483647.
	 </apiDesc><apiOperationClassifier>int</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	
	 Reads a signed 32-bit integer from the file stream, byte stream, or byte array.
     </apiDesc></apiOperationDetail><adobeApiEvent id="flash.filesystem:FileStream:readInt_ioError"><apiName>ioError</apiName><prolog/><adobeApiEventDetail><adobeApiEventDef><adobeApiEventClassifier>flash.events:IOErrorEvent</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>The file cannot be read or the file is not open. This event is dispatched 
	only for files opened for asynchronous operations (by using the <codeph>openAsync()</codeph> method).
	
	</apiDesc></adobeApiEventDetail><shortdesc>The file cannot be read or the file is not open.</shortdesc></adobeApiEvent></apiOperation><apiOperation id="flash.filesystem:FileStream:readMultiByte"><apiName>readMultiByte</apiName><shortdesc>
	
	 Reads a multibyte string of specified length from the file stream, byte stream, or byte array using the
	 specified character set.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiException><apiDesc>The file has not been opened; the file has been opened, but it was not opened with
	read capabilities; or for a file that has been opened for synchronous operations (by using the 
	<codeph>open()</codeph> method), the file cannot be read (for example, because the file is missing).
	
	</apiDesc><apiItemName>IOError</apiItemName><apiOperationClassifier>flash.errors:IOError</apiOperationClassifier></apiException><apiException><apiDesc>The position specfied for reading data exceeds the number of bytes available 
	(specified by the <codeph>bytesAvailable</codeph> property).
	
	</apiDesc><apiItemName>EOFError</apiItemName><apiOperationClassifier>flash.errors:EOFError</apiOperationClassifier></apiException><apiReturn><apiDesc>UTF-8 encoded string.
	 </apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn><apiParam><apiItemName>length</apiItemName><apiOperationClassifier>uint</apiOperationClassifier><apiDesc>The number of bytes from the byte stream to read.
	 </apiDesc></apiParam><apiParam><apiItemName>charSet</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiDesc>The string denoting the character set to use to interpret the bytes. 
	 Possible character set strings include <codeph>"shift-jis"</codeph>, <codeph>"cn-gb"</codeph>,
	 <codeph>"iso-8859-1"</codeph>, and others.
	 For a complete list, see <xref href="../../charset-codes.html">Supported Character Sets</xref>. 
	 
     <p><b>Note:</b> If the value for the <codeph>charSet</codeph> parameter is not recognized by the current 
	 system, then <ph platform="actionscript">Adobe<sup>®</sup> Flash<sup>®</sup> Player or</ph> 
	 Adobe<sup>®</sup> AIR<sup>®</sup> uses the system's default 
	 code page as the character set. For example, a value for the <codeph>charSet</codeph> parameter, as in 
	 <codeph>myTest.readMultiByte(22, "iso-8859-01")</codeph>, that uses  <codeph>01</codeph> instead of
	 <codeph>1</codeph> might work on your development machine, but not on another machine. On the other
	 machine, <ph platform="actionscript">Flash Player or</ph> the AIR runtime will use the system's 
	 default code page.</p>
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	
	 Reads a multibyte string of specified length from the file stream, byte stream, or byte array using the
	 specified character set.
	 
	 
	 </apiDesc></apiOperationDetail><related-links><link href="flash.filesystem.xml#File/systemCharset"><linktext>File.systemCharset</linktext></link></related-links><adobeApiEvent id="flash.filesystem:FileStream:readMultiByte_ioError"><apiName>ioError</apiName><prolog/><adobeApiEventDetail><adobeApiEventDef><adobeApiEventClassifier>flash.events:IOErrorEvent</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>The file cannot be read or the file is not open. This event is dispatched 
	only for files opened for asynchronous operations (by using the <codeph>openAsync()</codeph> method).
	
	</apiDesc></adobeApiEventDetail><shortdesc>The file cannot be read or the file is not open.</shortdesc></adobeApiEvent></apiOperation><apiOperation id="flash.filesystem:FileStream:readObject"><apiName>readObject</apiName><shortdesc>
	
	 Reads an object from the file stream, byte stream, or byte array, encoded in AMF
	 serialized format.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiException><apiDesc>The file has not been opened; the file has been opened, but it was not opened with
	read capabilities; or for a file that has been opened for synchronous operations (by using the 
	<codeph>open()</codeph> method), the file cannot be read (for example, because the file is missing).
	
	</apiDesc><apiItemName>IOError</apiItemName><apiOperationClassifier>flash.errors:IOError</apiOperationClassifier></apiException><apiException><apiDesc>The position specfied for reading data exceeds the number of bytes available 
	(specified by the <codeph>bytesAvailable</codeph> property).
	
	</apiDesc><apiItemName>EOFError</apiItemName><apiOperationClassifier>flash.errors:EOFError</apiOperationClassifier></apiException><apiReturn><apiDesc>The deserialized object
	 
	 </apiDesc><apiType value="any"/></apiReturn></apiOperationDef><apiDesc>
	
	 Reads an object from the file stream, byte stream, or byte array, encoded in AMF
	 serialized format.
	 </apiDesc></apiOperationDetail><related-links><link href="../../flash/net/package.html#registerClassAlias()"><linktext>flash.net.registerClassAlias()</linktext></link></related-links><adobeApiEvent id="flash.filesystem:FileStream:readObject_ioError"><apiName>ioError</apiName><prolog/><adobeApiEventDetail><adobeApiEventDef><adobeApiEventClassifier>flash.events:IOErrorEvent</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>The file cannot be read or the file is not open. This event is dispatched 
	only for files opened for asynchronous operations (by using the <codeph>openAsync()</codeph> method).
	
	</apiDesc></adobeApiEventDetail><shortdesc>The file cannot be read or the file is not open.</shortdesc></adobeApiEvent></apiOperation><apiOperation id="flash.filesystem:FileStream:readShort"><apiName>readShort</apiName><shortdesc>
	
	 Reads a signed 16-bit integer from the file stream, byte stream, or byte array.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiException><apiDesc>The file has not been opened; the file has been opened, but it was not opened with
	read capabilities; or for a file that has been opened for synchronous operations (by using the 
	<codeph>open()</codeph> method), the file cannot be read (for example, because the file is missing).
	
	</apiDesc><apiItemName>IOError</apiItemName><apiOperationClassifier>flash.errors:IOError</apiOperationClassifier></apiException><apiException><apiDesc>The position specfied for reading data exceeds the number of bytes available 
	(specified by the <codeph>bytesAvailable</codeph> property).
	
	</apiDesc><apiItemName>EOFError</apiItemName><apiOperationClassifier>flash.errors:EOFError</apiOperationClassifier></apiException><apiReturn><apiDesc>The returned value is in the range -32768 to 32767.
	 </apiDesc><apiOperationClassifier>int</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	
	 Reads a signed 16-bit integer from the file stream, byte stream, or byte array.
	 </apiDesc></apiOperationDetail><adobeApiEvent id="flash.filesystem:FileStream:readShort_ioError"><apiName>ioError</apiName><prolog/><adobeApiEventDetail><adobeApiEventDef><adobeApiEventClassifier>flash.events:IOErrorEvent</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>The file cannot be read or the file is not open. This event is dispatched 
	only for files opened for asynchronous operations (by using the <codeph>openAsync()</codeph> method).
	
	</apiDesc></adobeApiEventDetail><shortdesc>The file cannot be read or the file is not open.</shortdesc></adobeApiEvent></apiOperation><apiOperation id="flash.filesystem:FileStream:readUTF"><apiName>readUTF</apiName><shortdesc>
	
	 Reads a UTF-8 string from the file stream, byte stream, or byte array.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiException><apiDesc>The file has not been opened; the file has been opened, but it was not opened with
	read capabilities; or for a file that has been opened for synchronous operations (by using the 
	<codeph>open()</codeph> method), the file cannot be read (for example, because the file is missing).
	
	</apiDesc><apiItemName>IOError</apiItemName><apiOperationClassifier>flash.errors:IOError</apiOperationClassifier></apiException><apiException><apiDesc>The position specfied for reading data exceeds the number of bytes available 
	(specified by the <codeph>bytesAvailable</codeph> property).
	
	</apiDesc><apiItemName>EOFError</apiItemName><apiOperationClassifier>flash.errors:EOFError</apiOperationClassifier></apiException><apiReturn><apiDesc>A UTF-8 string produced by the byte representation of characters.
	 
	 </apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	
	 Reads a UTF-8 string from the file stream, byte stream, or byte array.  The string
	 is assumed to be prefixed with an unsigned short indicating
	 the length in bytes.
	 
	 <p>This method is similar to the <codeph>readUTF()</codeph>
	 method in the Java<sup>®</sup> IDataInput interface.</p>
	 </apiDesc></apiOperationDetail><adobeApiEvent id="flash.filesystem:FileStream:readUTF_ioError"><apiName>ioError</apiName><prolog/><adobeApiEventDetail><adobeApiEventDef><adobeApiEventClassifier>flash.events:IOErrorEvent</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>The file cannot be read or the file is not open. This event is dispatched 
	only for files opened for asynchronous operations (by using the <codeph>openAsync()</codeph> method).
	
	</apiDesc></adobeApiEventDetail><shortdesc>The file cannot be read or the file is not open.</shortdesc></adobeApiEvent></apiOperation><apiOperation id="flash.filesystem:FileStream:readUTFBytes"><apiName>readUTFBytes</apiName><shortdesc>
	
	 Reads a sequence of UTF-8 bytes from the byte stream or byte array and returns a string.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiException><apiDesc>The file has not been opened; the file has been opened, but it was not opened with
	read capabilities; or for a file that has been opened for synchronous operations (by using the 
	<codeph>open()</codeph> method), the file cannot be read (for example, because the file is missing).
	
	</apiDesc><apiItemName>IOError</apiItemName><apiOperationClassifier>flash.errors:IOError</apiOperationClassifier></apiException><apiException><apiDesc>The position specfied for reading data exceeds the number of bytes available 
	(specified by the <codeph>bytesAvailable</codeph> property).
	
	</apiDesc><apiItemName>EOFError</apiItemName><apiOperationClassifier>flash.errors:EOFError</apiOperationClassifier></apiException><apiReturn><apiDesc>A UTF-8 string produced by the byte representation of characters of the specified length.	 
	 </apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn><apiParam><apiItemName>length</apiItemName><apiOperationClassifier>uint</apiOperationClassifier><apiDesc>The number of bytes to read.
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	
	 Reads a sequence of UTF-8 bytes from the byte stream or byte array and returns a string.
	 </apiDesc></apiOperationDetail><adobeApiEvent id="flash.filesystem:FileStream:readUTFBytes_ioError"><apiName>ioError</apiName><prolog/><adobeApiEventDetail><adobeApiEventDef><adobeApiEventClassifier>flash.events:IOErrorEvent</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>The file cannot be read or the file is not open. This event is dispatched 
	only for files opened for asynchronous operations (by using the <codeph>openAsync()</codeph> method).
	
	</apiDesc></adobeApiEventDetail><shortdesc>The file cannot be read or the file is not open.</shortdesc></adobeApiEvent></apiOperation><apiOperation id="flash.filesystem:FileStream:readUnsignedByte"><apiName>readUnsignedByte</apiName><shortdesc>
	
	 Reads an unsigned byte from the file stream, byte stream, or byte array.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiException><apiDesc>The file has not been opened; the file has been opened, but it was not opened with
	read capabilities; or for a file that has been opened for synchronous operations (by using the 
	<codeph>open()</codeph> method), the file cannot be read (for example, because the file is missing).
	
	</apiDesc><apiItemName>IOError</apiItemName><apiOperationClassifier>flash.errors:IOError</apiOperationClassifier></apiException><apiException><apiDesc>The position specfied for reading data exceeds the number of bytes available 
	(specified by the <codeph>bytesAvailable</codeph> property).
	
	</apiDesc><apiItemName>EOFError</apiItemName><apiOperationClassifier>flash.errors:EOFError</apiOperationClassifier></apiException><apiReturn><apiDesc>The returned value is in the range 0 to 255. 	   
	 </apiDesc><apiOperationClassifier>uint</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	
	 Reads an unsigned byte from the file stream, byte stream, or byte array.
	 </apiDesc></apiOperationDetail><adobeApiEvent id="flash.filesystem:FileStream:readUnsignedByte_ioError"><apiName>ioError</apiName><prolog/><adobeApiEventDetail><adobeApiEventDef><adobeApiEventClassifier>flash.events:IOErrorEvent</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>The file cannot be read or the file is not open. This event is dispatched 
	only for files opened for asynchronous operations (by using the <codeph>openAsync()</codeph> method).
	
	</apiDesc></adobeApiEventDetail><shortdesc>The file cannot be read or the file is not open.</shortdesc></adobeApiEvent></apiOperation><apiOperation id="flash.filesystem:FileStream:readUnsignedInt"><apiName>readUnsignedInt</apiName><shortdesc>
	
	 Reads an unsigned 32-bit integer from the file stream, byte stream, or byte array.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiException><apiDesc>The file has not been opened; the file has been opened, but it was not opened with
	read capabilities; or for a file that has been opened for synchronous operations (by using the 
	<codeph>open()</codeph> method), the file cannot be read (for example, because the file is missing).
	
	</apiDesc><apiItemName>IOError</apiItemName><apiOperationClassifier>flash.errors:IOError</apiOperationClassifier></apiException><apiException><apiDesc>The position specfied for reading data exceeds the number of bytes available 
	(specified by the <codeph>bytesAvailable</codeph> property).
	
	</apiDesc><apiItemName>EOFError</apiItemName><apiOperationClassifier>flash.errors:EOFError</apiOperationClassifier></apiException><apiReturn><apiDesc>The returned value is in the range 0 to 4294967295.
	 </apiDesc><apiOperationClassifier>uint</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	
	 Reads an unsigned 32-bit integer from the file stream, byte stream, or byte array.
	 </apiDesc></apiOperationDetail><adobeApiEvent id="flash.filesystem:FileStream:readUnsignedInt_ioError"><apiName>ioError</apiName><prolog/><adobeApiEventDetail><adobeApiEventDef><adobeApiEventClassifier>flash.events:IOErrorEvent</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>The file cannot be read or the file is not open. This event is dispatched 
	only for files opened for asynchronous operations (by using the <codeph>openAsync()</codeph> method).
	
	</apiDesc></adobeApiEventDetail><shortdesc>The file cannot be read or the file is not open.</shortdesc></adobeApiEvent></apiOperation><apiOperation id="flash.filesystem:FileStream:readUnsignedShort"><apiName>readUnsignedShort</apiName><shortdesc>
	
	 Reads an unsigned 16-bit integer from the file stream, byte stream, or byte array.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiException><apiDesc>The file has not been opened; the file has been opened, but it was not opened with
	read capabilities; or for a file that has been opened for synchronous operations (by using the 
	<codeph>open()</codeph> method), the file cannot be read (for example, because the file is missing).
	
	</apiDesc><apiItemName>IOError</apiItemName><apiOperationClassifier>flash.errors:IOError</apiOperationClassifier></apiException><apiException><apiDesc>The position specfied for reading data exceeds the number of bytes available 
	(specified by the <codeph>bytesAvailable</codeph> property).
	
	</apiDesc><apiItemName>EOFError</apiItemName><apiOperationClassifier>flash.errors:EOFError</apiOperationClassifier></apiException><apiReturn><apiDesc>The returned value is in the range 0 to 65535. 
	 </apiDesc><apiOperationClassifier>uint</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	
	 Reads an unsigned 16-bit integer from the file stream, byte stream, or byte array.
	 </apiDesc></apiOperationDetail><adobeApiEvent id="flash.filesystem:FileStream:readUnsignedShort_ioError"><apiName>ioError</apiName><prolog/><adobeApiEventDetail><adobeApiEventDef><adobeApiEventClassifier>flash.events:IOErrorEvent</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>The file cannot be read or the file is not open. This event is dispatched 
	only for files opened for asynchronous operations (by using the <codeph>openAsync()</codeph> method).
	
	</apiDesc></adobeApiEventDetail><shortdesc>The file cannot be read or the file is not open.</shortdesc></adobeApiEvent></apiOperation><apiOperation id="flash.filesystem:FileStream:truncate"><apiName>truncate</apiName><shortdesc>
	 Truncates the file at the position specified by the position property of the FileStream
	 object.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiException><apiDesc>The file is not open for writing.
	 
	 </apiDesc><apiItemName>IllegalOperationError</apiItemName><apiOperationClassifier>flash.errors:IllegalOperationError</apiOperationClassifier></apiException><apiReturn><apiType value="void"/></apiReturn></apiOperationDef><apiDesc>
	 Truncates the file at the position specified by the <codeph>position</codeph> property of the FileStream
	 object. 
	 
	 <p>Bytes from the position specified by the <codeph>position</codeph> property to the end of the file 
	 are deleted. The file must be open for writing.</p>
	 
	 </apiDesc><example conref="examples\FileStream.truncate.1.as"> The following code synchronously opens a test.txt file in the Apollo Test subdirectory of 
 the user's documents directory and then trims the file to 100 characters in length if it is longer than
 100 characters.
<codeblock>
import flash.filesystem.*;

var file:File = File.documentsDirectory;
file = file.resolvePath("Apollo Test/test.txt");
var fileStream:FileStream = new FileStream();
fileStream.open(file, FileMode.UPDATE);
if (file.size &gt; 100) {
    fileStream.position = 100;
    fileStream.truncate();
}
fileStream.close();
</codeblock></example><example conref="examples\FileStream.truncate.2.as"> The following code <i>asynchronously</i> opens a test.txt file in the Apollo Test subdirectory 
 of the user's documents directory, and then trims the file to 100 characters in length if it is longer than 100
 characters.
<codeblock>
var file:File = File.documentsDirectory;
file = file.resolvePath("Apollo Test/test.txt");
var fileStream:FileStream = new FileStream();
fileStream.openAsync(file, FileMode.UPDATE);
trace("start", file.size)
if (file.size &gt; 100) {
    fileStream.position = 100;
    fileStream.truncate();
}
fileStream.addEventListener(Event.CLOSE, fileClosed);
fileStream.close();
function fileClosed(event:Event):void {
    trace("closed", file.size); 
}
</codeblock></example></apiOperationDetail><related-links><link href="flash.filesystem.xml#FileStream/position"><linktext>position</linktext></link></related-links></apiOperation><apiOperation id="flash.filesystem:FileStream:writeBoolean"><apiName>writeBoolean</apiName><shortdesc>
	
	 Writes a Boolean value.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiException><apiDesc>The file has not been opened; the file has been opened, but it was not opened with
	write capabilities; or for a file that has been opened for synchronous operations (by using the 
	<codeph>open()</codeph> method), the file cannot be written (for example, because the file is missing).
	
	</apiDesc><apiItemName>IOError</apiItemName><apiOperationClassifier>flash.errors:IOError</apiOperationClassifier></apiException><apiReturn><apiType value="void"/></apiReturn><apiParam><apiItemName>value</apiItemName><apiOperationClassifier>Boolean</apiOperationClassifier><apiDesc>A Boolean value determining which byte is written. If the parameter is <codeph>true</codeph>, 
	 1 is written; if <codeph>false</codeph>, 0 is written.
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	
	 Writes a Boolean value. A single byte is written according to the <codeph>value</codeph> parameter,
	 either 1 if <codeph>true</codeph> or 0 if <codeph>false</codeph>.
	 
	 </apiDesc></apiOperationDetail><adobeApiEvent id="flash.filesystem:FileStream:writeBoolean_ioError"><apiName>ioError</apiName><prolog/><adobeApiEventDetail><adobeApiEventDef><adobeApiEventClassifier>flash.events:IOErrorEvent</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>You cannot write to the file (for example, because the file is missing). 
	This event is dispatched only for files that have been opened for asynchronous operations (by using the 
	<codeph>openAsync()</codeph> method).
	
	</apiDesc></adobeApiEventDetail><shortdesc>You cannot write to the file (for example, because the file is missing).</shortdesc></adobeApiEvent></apiOperation><apiOperation id="flash.filesystem:FileStream:writeByte"><apiName>writeByte</apiName><shortdesc>
	
	 Writes a byte.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiException><apiDesc>The file has not been opened; the file has been opened, but it was not opened with
	write capabilities; or for a file that has been opened for synchronous operations (by using the 
	<codeph>open()</codeph> method), the file cannot be written (for example, because the file is missing).
	
	</apiDesc><apiItemName>IOError</apiItemName><apiOperationClassifier>flash.errors:IOError</apiOperationClassifier></apiException><apiReturn><apiType value="void"/></apiReturn><apiParam><apiItemName>value</apiItemName><apiOperationClassifier>int</apiOperationClassifier><apiDesc>A byte value as an integer.
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	
	 Writes a byte.
	 The low 8 bits of the
	 parameter are used; the high 24 bits are ignored.
	 </apiDesc></apiOperationDetail><adobeApiEvent id="flash.filesystem:FileStream:writeByte_ioError"><apiName>ioError</apiName><prolog/><adobeApiEventDetail><adobeApiEventDef><adobeApiEventClassifier>flash.events:IOErrorEvent</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>You cannot write to the file (for example, because the file is missing). 
	This event is dispatched only for files that have been opened for asynchronous operations (by using the 
	<codeph>openAsync()</codeph> method).
	
	</apiDesc></adobeApiEventDetail><shortdesc>You cannot write to the file (for example, because the file is missing).</shortdesc></adobeApiEvent></apiOperation><apiOperation id="flash.filesystem:FileStream:writeBytes"><apiName>writeBytes</apiName><shortdesc>
	
	 Writes a sequence of bytes from the
	 specified byte array, bytes,
	 starting at the byte specified by offset 
	 (using a zero-based index)
	 with a length specified by length,
	 into the file stream, byte stream, or byte array.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiException><apiDesc>The file has not been opened; the file has been opened, but it was not opened with
	write capabilities; or for a file that has been opened for synchronous operations (by using the 
	<codeph>open()</codeph> method), the file cannot be written (for example, because the file is missing).
	
	</apiDesc><apiItemName>IOError</apiItemName><apiOperationClassifier>flash.errors:IOError</apiOperationClassifier></apiException><apiReturn><apiType value="void"/></apiReturn><apiParam><apiItemName>bytes</apiItemName><apiOperationClassifier>flash.utils:ByteArray</apiOperationClassifier><apiDesc>The byte array to write.
	 </apiDesc></apiParam><apiParam><apiItemName>offset</apiItemName><apiOperationClassifier>uint</apiOperationClassifier><apiData>0</apiData><apiDesc>A zero-based index specifying the position into the array to begin writing.
	 </apiDesc></apiParam><apiParam><apiItemName>length</apiItemName><apiOperationClassifier>uint</apiOperationClassifier><apiData>0</apiData><apiDesc>An unsigned integer specifying how far into the buffer to write.
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	
	 Writes a sequence of bytes from the
	 specified byte array, <codeph>bytes</codeph>,
	 starting at the byte specified by <codeph>offset</codeph> 
	 (using a zero-based index)
	 with a length specified by <codeph>length</codeph>,
	 into the file stream, byte stream, or byte array.
	 
	 <p>If the <codeph>length</codeph> parameter is omitted, the default
	 length of 0 is used and the entire buffer starting at
	 <codeph>offset</codeph> is written.
	 If the <codeph>offset</codeph> parameter is also omitted, the entire buffer is
	 written. </p>
	 
	 <p>If the <codeph>offset</codeph> or <codeph>length</codeph> parameter
	 is out of range, they are clamped to the beginning and end
	 of the <codeph>bytes</codeph> array.</p>
 	 </apiDesc></apiOperationDetail><adobeApiEvent id="flash.filesystem:FileStream:writeBytes_ioError"><apiName>ioError</apiName><prolog/><adobeApiEventDetail><adobeApiEventDef><adobeApiEventClassifier>flash.events:IOErrorEvent</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>You cannot write to the file (for example, because the file is missing). 
	This event is dispatched only for files that have been opened for asynchronous operations (by using the 
	<codeph>openAsync()</codeph> method).
	
	</apiDesc></adobeApiEventDetail><shortdesc>You cannot write to the file (for example, because the file is missing).</shortdesc></adobeApiEvent></apiOperation><apiOperation id="flash.filesystem:FileStream:writeDouble"><apiName>writeDouble</apiName><shortdesc>
	
	 Writes an IEEE 754 double-precision (64-bit) floating point number.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiException><apiDesc>The file has not been opened; the file has been opened, but it was not opened with
	write capabilities; or for a file that has been opened for synchronous operations (by using the 
	<codeph>open()</codeph> method), the file cannot be written (for example, because the file is missing).
	
	</apiDesc><apiItemName>IOError</apiItemName><apiOperationClassifier>flash.errors:IOError</apiOperationClassifier></apiException><apiReturn><apiType value="void"/></apiReturn><apiParam><apiItemName>value</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>A double-precision (64-bit) floating point number.
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	
	 Writes an IEEE 754 double-precision (64-bit) floating point number.
	 </apiDesc></apiOperationDetail><adobeApiEvent id="flash.filesystem:FileStream:writeDouble_ioError"><apiName>ioError</apiName><prolog/><adobeApiEventDetail><adobeApiEventDef><adobeApiEventClassifier>flash.events:IOErrorEvent</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>You cannot write to the file (for example, because the file is missing). 
	This event is dispatched only for files that have been opened for asynchronous operations (by using the 
	<codeph>openAsync()</codeph> method).
	
	</apiDesc></adobeApiEventDetail><shortdesc>You cannot write to the file (for example, because the file is missing).</shortdesc></adobeApiEvent></apiOperation><apiOperation id="flash.filesystem:FileStream:writeFloat"><apiName>writeFloat</apiName><shortdesc>
	
	 Writes an IEEE 754 single-precision (32-bit) floating point number.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiException><apiDesc>The file has not been opened; the file has been opened, but it was not opened with
	write capabilities; or for a file that has been opened for synchronous operations (by using the 
	<codeph>open()</codeph> method), the file cannot be written (for example, because the file is missing).
	
	</apiDesc><apiItemName>IOError</apiItemName><apiOperationClassifier>flash.errors:IOError</apiOperationClassifier></apiException><apiReturn><apiType value="void"/></apiReturn><apiParam><apiItemName>value</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>A single-precision (32-bit) floating point number.
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	
	 Writes an IEEE 754 single-precision (32-bit) floating point number.
	 </apiDesc></apiOperationDetail><adobeApiEvent id="flash.filesystem:FileStream:writeFloat_ioError"><apiName>ioError</apiName><prolog/><adobeApiEventDetail><adobeApiEventDef><adobeApiEventClassifier>flash.events:IOErrorEvent</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>You cannot write to the file (for example, because the file is missing). 
	This event is dispatched only for files that have been opened for asynchronous operations (by using the 
	<codeph>openAsync()</codeph> method).
	
	</apiDesc></adobeApiEventDetail><shortdesc>You cannot write to the file (for example, because the file is missing).</shortdesc></adobeApiEvent></apiOperation><apiOperation id="flash.filesystem:FileStream:writeInt"><apiName>writeInt</apiName><shortdesc>
	
	 Writes a 32-bit signed integer.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiException><apiDesc>The file has not been opened; the file has been opened, but it was not opened with
	write capabilities; or for a file that has been opened for synchronous operations (by using the 
	<codeph>open()</codeph> method), the file cannot be written (for example, because the file is missing).
	
	</apiDesc><apiItemName>IOError</apiItemName><apiOperationClassifier>flash.errors:IOError</apiOperationClassifier></apiException><apiReturn><apiType value="void"/></apiReturn><apiParam><apiItemName>value</apiItemName><apiOperationClassifier>int</apiOperationClassifier><apiDesc>A byte value as a signed integer.
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	
	 Writes a 32-bit signed integer.
	 </apiDesc></apiOperationDetail><adobeApiEvent id="flash.filesystem:FileStream:writeInt_ioError"><apiName>ioError</apiName><prolog/><adobeApiEventDetail><adobeApiEventDef><adobeApiEventClassifier>flash.events:IOErrorEvent</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>You cannot write to the file (for example, because the file is missing). 
	This event is dispatched only for files that have been opened for asynchronous operations (by using the 
	<codeph>openAsync()</codeph> method).
	
	</apiDesc></adobeApiEventDetail><shortdesc>You cannot write to the file (for example, because the file is missing).</shortdesc></adobeApiEvent></apiOperation><apiOperation id="flash.filesystem:FileStream:writeMultiByte"><apiName>writeMultiByte</apiName><shortdesc>
	
	 Writes a multibyte string to the file stream, byte stream, or byte array, using the specified character set.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiException><apiDesc>The file has not been opened; the file has been opened, but it was not opened with
	write capabilities; or for a file that has been opened for synchronous operations (by using the 
	<codeph>open()</codeph> method), the file cannot be written (for example, because the file is missing).
	
	</apiDesc><apiItemName>IOError</apiItemName><apiOperationClassifier>flash.errors:IOError</apiOperationClassifier></apiException><apiReturn><apiType value="void"/></apiReturn><apiParam><apiItemName>value</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiDesc>The string value to be written.
	 </apiDesc></apiParam><apiParam><apiItemName>charSet</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiDesc>The string denoting the character set to use. Possible character set strings
	 include <codeph>"shift-jis"</codeph>, <codeph>"cn-gb"</codeph>, <codeph>"iso-8859-1"</codeph>, and others.
	 For a complete list, see <xref href="../../charset-codes.html">Supported Character Sets</xref>. 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	
	 Writes a multibyte string to the file stream, byte stream, or byte array, using the specified character set. 
	 
	 </apiDesc></apiOperationDetail><related-links><link href="flash.filesystem.xml#File/systemCharset"><linktext>File.systemCharset</linktext></link></related-links><adobeApiEvent id="flash.filesystem:FileStream:writeMultiByte_ioError"><apiName>ioError</apiName><prolog/><adobeApiEventDetail><adobeApiEventDef><adobeApiEventClassifier>flash.events:IOErrorEvent</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>You cannot write to the file (for example, because the file is missing). 
	This event is dispatched only for files that have been opened for asynchronous operations (by using the 
	<codeph>openAsync()</codeph> method).
	
	</apiDesc></adobeApiEventDetail><shortdesc>You cannot write to the file (for example, because the file is missing).</shortdesc></adobeApiEvent></apiOperation><apiOperation id="flash.filesystem:FileStream:writeObject"><apiName>writeObject</apiName><shortdesc>
	
	 Writes an object to the file stream, byte stream, or byte array, in AMF serialized
	 format.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiException><apiDesc>The file has not been opened; the file has been opened, but it was not opened with
	write capabilities; or for a file that has been opened for synchronous operations (by using the 
	<codeph>open()</codeph> method), the file cannot be written (for example, because the file is missing).
	
	</apiDesc><apiItemName>IOError</apiItemName><apiOperationClassifier>flash.errors:IOError</apiOperationClassifier></apiException><apiReturn><apiType value="void"/></apiReturn><apiParam><apiItemName>object</apiItemName><apiType value=""/><apiDesc>The object to be serialized.
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	
	 Writes an object to the file stream, byte stream, or byte array, in AMF serialized
	 format.
	 </apiDesc></apiOperationDetail><related-links><link href="../../flash/net/package.html#registerClassAlias()"><linktext>flash.net.registerClassAlias()</linktext></link></related-links><adobeApiEvent id="flash.filesystem:FileStream:writeObject_ioError"><apiName>ioError</apiName><prolog/><adobeApiEventDetail><adobeApiEventDef><adobeApiEventClassifier>flash.events:IOErrorEvent</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>You cannot write to the file (for example, because the file is missing). 
	This event is dispatched only for files that have been opened for asynchronous operations (by using the 
	<codeph>openAsync()</codeph> method).
	
	</apiDesc></adobeApiEventDetail><shortdesc>You cannot write to the file (for example, because the file is missing).</shortdesc></adobeApiEvent></apiOperation><apiOperation id="flash.filesystem:FileStream:writeShort"><apiName>writeShort</apiName><shortdesc>
	
	 Writes a 16-bit integer.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiException><apiDesc>The file has not been opened; the file has been opened, but it was not opened with
	write capabilities; or for a file that has been opened for synchronous operations (by using the 
	<codeph>open()</codeph> method), the file cannot be written (for example, because the file is missing).
	
	</apiDesc><apiItemName>IOError</apiItemName><apiOperationClassifier>flash.errors:IOError</apiOperationClassifier></apiException><apiReturn><apiType value="void"/></apiReturn><apiParam><apiItemName>value</apiItemName><apiOperationClassifier>int</apiOperationClassifier><apiDesc>A byte value as an integer.
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	
	 Writes a 16-bit integer. The low 16 bits of the parameter are used; 
	 the high 16 bits are ignored.
	 </apiDesc></apiOperationDetail><adobeApiEvent id="flash.filesystem:FileStream:writeShort_ioError"><apiName>ioError</apiName><prolog/><adobeApiEventDetail><adobeApiEventDef><adobeApiEventClassifier>flash.events:IOErrorEvent</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>You cannot write to the file (for example, because the file is missing). 
	This event is dispatched only for files that have been opened for asynchronous operations (by using the 
	<codeph>openAsync()</codeph> method).
	
	</apiDesc></adobeApiEventDetail><shortdesc>You cannot write to the file (for example, because the file is missing).</shortdesc></adobeApiEvent></apiOperation><apiOperation id="flash.filesystem:FileStream:writeUTF"><apiName>writeUTF</apiName><shortdesc>
	
	 Writes a UTF-8 string to the file stream, byte stream, or byte array.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiException><apiDesc>The file has not been opened; the file has been opened, but it was not opened with
	write capabilities; or for a file that has been opened for synchronous operations (by using the 
	<codeph>open()</codeph> method), the file cannot be written (for example, because the file is missing).
	
	</apiDesc><apiItemName>IOError</apiItemName><apiOperationClassifier>flash.errors:IOError</apiOperationClassifier></apiException><apiReturn><apiType value="void"/></apiReturn><apiParam><apiItemName>value</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiDesc>The string value to be written.
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	
	 Writes a UTF-8 string to the file stream, byte stream, or byte array. The length of the UTF-8 string in bytes 
	 is written first, as a 16-bit integer, followed by the bytes representing the 
	 characters of the string.
	 </apiDesc></apiOperationDetail><adobeApiEvent id="flash.filesystem:FileStream:writeUTF_ioError"><apiName>ioError</apiName><prolog/><adobeApiEventDetail><adobeApiEventDef><adobeApiEventClassifier>flash.events:IOErrorEvent</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>You cannot write to the file (for example, because the file is missing). 
	This event is dispatched only for files that have been opened for asynchronous operations (by using the 
	<codeph>openAsync()</codeph> method).
	
	</apiDesc></adobeApiEventDetail><shortdesc>You cannot write to the file (for example, because the file is missing).</shortdesc></adobeApiEvent></apiOperation><apiOperation id="flash.filesystem:FileStream:writeUTFBytes"><apiName>writeUTFBytes</apiName><shortdesc>
	
	 Writes a UTF-8 string.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiException><apiDesc>The file has not been opened; the file has been opened, but it was not opened with
	write capabilities; or for a file that has been opened for synchronous operations (by using the 
	<codeph>open()</codeph> method), the file cannot be written (for example, because the file is missing).
	
	</apiDesc><apiItemName>IOError</apiItemName><apiOperationClassifier>flash.errors:IOError</apiOperationClassifier></apiException><apiReturn><apiType value="void"/></apiReturn><apiParam><apiItemName>value</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiDesc>The string value to be written.
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	
	 Writes a UTF-8 string. Similar to <codeph>writeUTF()</codeph>,
	 but does not prefix the string with a 16-bit length word.
	 </apiDesc></apiOperationDetail><adobeApiEvent id="flash.filesystem:FileStream:writeUTFBytes_ioError"><apiName>ioError</apiName><prolog/><adobeApiEventDetail><adobeApiEventDef><adobeApiEventClassifier>flash.events:IOErrorEvent</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>You cannot write to the file (for example, because the file is missing). 
	This event is dispatched only for files that have been opened for asynchronous operations (by using the 
	<codeph>openAsync()</codeph> method).
	
	</apiDesc></adobeApiEventDetail><shortdesc>You cannot write to the file (for example, because the file is missing).</shortdesc></adobeApiEvent></apiOperation><apiOperation id="flash.filesystem:FileStream:writeUnsignedInt"><apiName>writeUnsignedInt</apiName><shortdesc>
	
	 Writes a 32-bit unsigned integer.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiException><apiDesc>The file has not been opened; the file has been opened, but it was not opened with
	write capabilities; or for a file that has been opened for synchronous operations (by using the 
	<codeph>open()</codeph> method), the file cannot be written (for example, because the file is missing).
	
	</apiDesc><apiItemName>IOError</apiItemName><apiOperationClassifier>flash.errors:IOError</apiOperationClassifier></apiException><apiReturn><apiType value="void"/></apiReturn><apiParam><apiItemName>value</apiItemName><apiOperationClassifier>uint</apiOperationClassifier><apiDesc>A byte value as an unsigned integer.
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	
	 Writes a 32-bit unsigned integer.
	 </apiDesc></apiOperationDetail><adobeApiEvent id="flash.filesystem:FileStream:writeUnsignedInt_ioError"><apiName>ioError</apiName><prolog/><adobeApiEventDetail><adobeApiEventDef><adobeApiEventClassifier>flash.events:IOErrorEvent</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>You cannot write to the file (for example, because the file is missing). 
	This event is dispatched only for files that have been opened for asynchronous operations (by using the 
	<codeph>openAsync()</codeph> method).
	
	</apiDesc></adobeApiEventDetail><shortdesc>You cannot write to the file (for example, because the file is missing).</shortdesc></adobeApiEvent></apiOperation><apiValue id="flash.filesystem:FileStream:bytesAvailable:get"><apiName>bytesAvailable</apiName><shortdesc>
	
	 Returns the number of bytes of data available for reading
	 in the input buffer.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="read"/><apiValueClassifier>uint</apiValueClassifier></apiValueDef><apiDesc>
	
	 Returns the number of bytes of data available for reading
	 in the input buffer.
	 User code must call <codeph>bytesAvailable</codeph> to ensure
	 that sufficient data is available before trying to read
	 it with one of the read methods.
	 </apiDesc><example conref="examples\FileStream.bytesAvailable.1.as"/></apiValueDetail></apiValue><apiValue id="flash.filesystem:FileStream:endian:get"><apiName>endian</apiName><shortdesc>
	
	 The byte order for the data, either the BIG_ENDIAN or LITTLE_ENDIAN constant 
	 from the Endian class.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="readwrite"/><apiValueClassifier>String</apiValueClassifier></apiValueDef><apiDesc>
	
	 The byte order for the data, either the <codeph>BIG_ENDIAN</codeph> or <codeph>LITTLE_ENDIAN</codeph> constant 
	 from the Endian class.
	 
	 </apiDesc></apiValueDetail></apiValue><apiValue id="flash.filesystem:FileStream:objectEncoding:get"><apiName>objectEncoding</apiName><shortdesc>
     Specifies whether the AMF3 or AMF0 format is used when writing or reading binary data by using the 
	 readObject() or writeObject() method.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="readwrite"/><apiValueClassifier>uint</apiValueClassifier></apiValueDef><apiDesc>
     Specifies whether the AMF3 or AMF0 format is used when writing or reading binary data by using the 
	 <codeph>readObject()</codeph> or <codeph>writeObject()</codeph> method.
	 
	 <p>The value is a constant from the ObjectEncoding class. By default, the AMF3 format is used.</p>
	 
	 </apiDesc></apiValueDetail><related-links><link href="flash.net.xml#ObjectEncoding"><linktext>ObjectEncoding</linktext></link><link href="flash.filesystem.xml#FileStream/readObject()"><linktext>readObject()</linktext></link><link href="flash.filesystem.xml#FileStream/writeObject()"><linktext>writeObject()</linktext></link></related-links></apiValue><apiValue id="flash.filesystem:FileStream:position:get"><apiName>position</apiName><shortdesc>
	 The current position in the file.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="readwrite"/><apiValueClassifier>Number</apiValueClassifier></apiValueDef><apiDesc>
	 The current position in the file. 
	 
	 <p>This value is modified in any of the following ways:</p>
	 
	 <ul>
	 
	 	<li>When you set the property explicitly</li>
	 
	 	<li>When reading from the FileStream object (by using one of the read methods)</li>
	 
	 	<li>When writing to the FileStream object</li>
	 
	 </ul>
	 
	 <p>The position is defined as a Number (instead of uint) in order to support files larger
	 than 2<sup>32</sup> bytes in length.  The value of this property is always
	 a whole number less than 2<sup>53</sup>. If you set this value to a number with a 
	 fractional component, the value is rounded down to the nearest integer.</p>
	 
	 <p>When reading a file asyncronously, if you set the <codeph>position</codeph> property,
	 the application begins filling the read buffer with the data starting at the specified
	 position, and the <codeph>bytesAvailable</codeph> property may be set to 0. Wait for a <codeph>complete</codeph>
	 event before using a read method to read data; or wait for a <codeph>progress</codeph> event 
	 and check the <codeph>bytesAvailable</codeph> property before using a read method.</p>
	  
	 </apiDesc><example conref="examples\FileStream.position.1.as"> The following code shows how a <codeph>position</codeph> property of the FileStream object 
 is updated as the application reads data from a file.
<codeblock>
import flash.fileSystem.*;
import flash.utils.ByteArray;
import flash.events.Event;

var sourceFile:File = File.documentsDirectory.resolvePath("Apollo Test/test.txt");
var stream:FileStream = new FileStream();
stream.addEventListener(Event.COMPLETE, readBytes);
stream.openAsync(sourceFile, File);

function readBytes(e:Event):void {
    var bytes:ByteArray = new ByteArray();
    trace("position 0:", stream.position); // 0
    bytes[0] = stream.readByte();
    trace("position 1:", stream.position); // 1
    fileStream.readBytes(bytes, stream.position, 4); 
    trace("position 2:", stream.position); // 5
    stream.close();
}
</codeblock></example></apiValueDetail></apiValue><apiValue id="flash.filesystem:FileStream:readAhead:get"><apiName>readAhead</apiName><shortdesc>
	 When reading files asynchronously, the amount of data requested.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><internal>Should the readAhead value dwindle to 0 as the data is read in.
	 
	 </internal></asCustoms></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="readwrite"/><apiValueClassifier>Number</apiValueClassifier></apiValueDef><apiDesc>
	 When reading files asynchronously, the amount of data requested.
	 
	 <p>This property specifies how much data an asynchronous stream attempts to read
	 beyond the current position. The default value of this property is infinity: by default
	 a file that is opened to read asynchronously reads as far as the end of the file.</p>
	 
	 <p>Reading data from the read buffer does not change the value of the <codeph>readAhead</codeph> 
	 property. When you read data from the buffer, new data is read in to refill the read buffer.</p>
	 
	 <p>The <codeph>readAhead</codeph> property has no effect on a file that is opened synchronously.</p>
	 
	 <p>As data is read in asynchronously, the FileStream object dispatches <codeph>progress</codeph> events. In the
	 event handler method for the <codeph>progress</codeph> event, check to see that the required number of bytes
	 is available (by checking the <codeph>bytesAvailable</codeph> property), and then read the data from the
	 read buffer by using a read method.</p>
	 
	 </apiDesc><example conref="examples\FileStream.readAhead.1.as">     The following code shows how to use the <codeph>readAhead</codeph> property to limit 
 the amount of data read into a file to 100 bytes:
<codeblock>
import flash.filesystem.*;

var file:File = File.desktopDirectory.resolvePath("test.txt");
var fileStream:FileStream = new FileStream();
fileStream.readAhead = 100;
fileStream.addEventListener(ProgressEvent.PROGRESS, readProgressHandler)
fileStream.openAsync(file, FileMode.READ);
var results:ByteArray;

function readProgressHandler(event:ProgressEvent):void {
    if (fileStream.bytesAvailable &gt;= 100) {
        fileStream.readBytes(results, 0, 100);
    }
}
</codeblock><swfblock conref="examples\FileStream.readAhead.1.swf"/></example></apiValueDetail></apiValue></apiClassifier><apiClassifier id="flash.filesystem:FileMode"><apiName>FileMode</apiName><shortdesc>
 The FileMode class defines string constants used in the fileMode parameter of 
 the open() and openAsync() methods of the FileStream class.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiStatic/><apiBaseClassifier>Object</apiBaseClassifier></apiClassifierDef><apiDesc>
 The FileMode class defines string constants used in the <codeph>fileMode</codeph> parameter of 
 the <codeph>open()</codeph> and <codeph>openAsync()</codeph> methods of the FileStream class.
 The <codeph>fileMode</codeph> parameter of these methods determines the capabilities available 
 to the FileStream object once the file is opened. 
 
 <p>The following capabilities are available, in various combinations, based on the <codeph>fileMode</codeph>
 parameter value specified in the open method:</p>
 
 <ul>
 
 	<li>Reading—The FileStream object can read data from the file.</li>
 	<li>Writing—The FileStream object can write data to the file.</li>
 	<li>Creating—The FileStream object creates a nonexistent file upon opening.</li>
 	<li>Truncate upon opening—Data in the file is deleted upon opening (before any data is written).</li>
 	<li>Append written data—Data is always written to the end of the file (when any write method is called).</li>
 
 </ul>
 
 <p>The following table shows the capabilities that each constant in the FileMode class provides when applied 
 as the <codeph>fileMode</codeph> parameter of an open method of a FileStream object:</p>
 
 <adobetable class="innertable">
 
 
 
 
 
 <tgroup cols="6"><thead><row><entry>FileMode constant</entry><entry align="center">Reading</entry><entry align="center">Writing</entry><entry align="center">Creating</entry><entry align="center">Truncate upon opening</entry><entry align="center">Append written data</entry></row></thead><tbody><row>
 	<entry><codeph>READ</codeph></entry>
 	<entry align="center"> • </entry>
 	<entry> </entry>
 	<entry> </entry>
 	<entry> </entry>
 	<entry> </entry>
 </row><row>
 	<entry><codeph>WRITE</codeph></entry>
 	<entry> </entry>
 	<entry align="center"> • </entry>
 	<entry align="center"> • </entry>
 	<entry align="center"> • </entry>
 	<entry> </entry>
 </row><row>
 	<entry><codeph>APPEND</codeph></entry>
 	<entry> </entry>
 	<entry align="center"> • </entry>
 	<entry align="center"> • </entry>
 	<entry/>
 	<entry align="center"> • </entry>
 </row><row>
 	<entry><codeph>UPDATE</codeph></entry>
 	<entry align="center"> • </entry>
 	<entry align="center"> • </entry>
 	<entry align="center"> • </entry>
 	<entry align="center"/>
 	<entry> </entry>
 </row></tbody></tgroup></adobetable>
 
 </apiDesc></apiClassifierDetail><related-links><link href="flash.filesystem.xml#FileStream/open()"><linktext>FileStream.open()</linktext></link><link href="flash.filesystem.xml#FileStream/openAsync()"><linktext>FileStream.openAsync()</linktext></link></related-links><apiValue id="flash.filesystem:FileMode:APPEND"><apiName>APPEND</apiName><shortdesc> 
	Used for a file to be opened in write mode, with all written data appended to the end of the file.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiAccess value="public"/><apiStatic/><apiData>append</apiData><apiValueClassifier>String</apiValueClassifier></apiValueDef><apiDesc> 
	Used for a file to be opened in write mode, with all written data appended to the end of the file. 
	Upon opening, any nonexistent file is created. 
	
	</apiDesc></apiValueDetail></apiValue><apiValue id="flash.filesystem:FileMode:READ"><apiName>READ</apiName><shortdesc> 
	Used for a file to be opened in read-only mode.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiAccess value="public"/><apiStatic/><apiData>read</apiData><apiValueClassifier>String</apiValueClassifier></apiValueDef><apiDesc> 
	Used for a file to be opened in read-only mode. The file must exist (missing files are not created).
	
	</apiDesc></apiValueDetail></apiValue><apiValue id="flash.filesystem:FileMode:UPDATE"><apiName>UPDATE</apiName><shortdesc> 
	Used for a file to be opened in read/write mode.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiAccess value="public"/><apiStatic/><apiData>update</apiData><apiValueClassifier>String</apiValueClassifier></apiValueDef><apiDesc> 
	Used for a file to be opened in read/write mode. Upon opening, any nonexistent file is created. 
	
	</apiDesc></apiValueDetail></apiValue><apiValue id="flash.filesystem:FileMode:WRITE"><apiName>WRITE</apiName><shortdesc> 
	Used for a file to be opened in write-only mode.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiAccess value="public"/><apiStatic/><apiData>write</apiData><apiValueClassifier>String</apiValueClassifier></apiValueDef><apiDesc> 
	Used for a file to be opened in write-only mode. Upon opening, any nonexistent file is created, and any
	existing file is truncated (its data is deleted).
	
	</apiDesc></apiValueDetail></apiValue></apiClassifier><apiClassifier id="flash.filesystem:File"><apiName>File</apiName><shortdesc>
 A File object represents a path to a file or directory.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiStatic/><apiBaseClassifier>flash.net:FileReference</apiBaseClassifier></apiClassifierDef><apiDesc>
 A File object represents a path to a file or directory. This can be an existing file or directory, or it can be
 one that does not yet exist; for instance, it can represent the path to a file or directory that you plan to create. 
 
  <p>The File class has a number of properties and methods for getting information about the file system and 
  for performing operations, such as copying files and directories.</p>
  
  <p>You can use File objects along with the FileStream class to read and write files. </p>
  
  <p>The File class extends the FileReference class. The FileReference class, which is available in Flash<sup>®</sup> Player as
  well as Adobe<sup>®</sup> AIR<sup>®</sup>, represents a pointer to a file, but the File class adds properties and methods that are not 
  exposed in Flash Player (in a SWF running in a browser), due to security considerations.</p>
  
  <p>The File class includes static properties that let you reference commonly used directory locations. These static properties include:</p>
  
  <ul>
  	<li><codeph>File.applicationStorageDirectory</codeph>—a storage directory unique to each installed AIR application</li>
      <li><codeph>File.applicationDirectory</codeph>—the read-only directory where the application is installed (along with any installed assets)</li>
      <li><codeph>File.desktopDirectory</codeph>—the user's desktop directory</li>
      <li><codeph>File.documentsDirectory</codeph>—the user's documents directory</li>
      <li><codeph>File.userDirectory</codeph>—the user directory</li>
  </ul>
  
  <p>These properties have meaningful values on different operating systems. For example, Mac OS, Linux, and Windows each have
  different native paths to the user's desktop directory. However, the <codeph>File.desktopDirectory</codeph> property points to the
  correct desktop directory path on each of these platforms. To write applications that work well across platforms, 
  use these properties as the basis for referencing other files used by the application. Then use the <codeph>resolvePath()</codeph>
  method to refine the path. For example, this code points to the preferences.xml file in the application storage directory:</p>
  
  <codeblock platform="actionscript"> var prefsFile:File = File.applicationStorageDirectory;
  prefsFile = prefsFile.resolvePath("preferences.xml");</codeblock>
  
  <codeblock platform="javascript"> var prefsFile = air.File.applicationStorageDirectory;
  prefsFile = prefsFile.resolvePath("preferences.xml");</codeblock>
  
  <p>If you use a literal native path in referencing a file, it will only work on one platform. 
  For example, the following File object would only work on Windows:</p> 
  
  <codeblock platform="actionscript">new File("C:\Documents and Settings\joe\My Documents\test.txt")</codeblock>
  <codeblock platform="javascript">new air.File("C:\Documents and Settings\joe\My Documents\test.txt")</codeblock>
  
  <p>The application storage directory is particularly useful. It gives an application-specific storage
  directory for the AIR application. It is defined by the <codeph>File.applicationStorageDirectory</codeph>
  property.</p>
  
  <p>Do not add or remove content from the application directory (where the AIR application is installed). 
  Doing so can break an AIR application and invalidate the application signature. AIR does not let you write to 
  the application directory by default, because the directory is not writable to all user accounts on all operating systems. 
  Use the application storage directory to write internal application files. Use the documents directory to write files 
  that a user expects to use outside your application, such as edited pictures or text files.</p>
  
  </apiDesc></apiClassifierDetail><related-links><link href="flash.filesystem.xml#FileStream"><linktext>FileStream</linktext></link></related-links><adobeApiEvent id="flash.filesystem:File_flash.events.FileListEvent.DIRECTORY_LISTING_directoryListing"><apiName>directoryListing</apiName><shortdesc>
 Dispatched when a directory list is available as a result of a call to the getDirectoryListingAsync()
 method.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><adobeApiEventDetail><adobeApiEventDef><apiEventType>flash.events.FileListEvent.DIRECTORY_LISTING</apiEventType><adobeApiEventClassifier>flash.events.FileListEvent</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>
 Dispatched when a directory list is available as a result of a call to the <codeph>getDirectoryListingAsync()</codeph>
 method.
 
 </apiDesc></adobeApiEventDetail><related-links><link href="flash.filesystem.xml#File/getDirectoryListingAsync()"><linktext>File.getDirectoryListingAsync()</linktext></link></related-links></adobeApiEvent><adobeApiEvent id="flash.filesystem:File_flash.events.FileListEvent.SELECT_MULTIPLE_selectMultiple"><apiName>selectMultiple</apiName><shortdesc>
 Dispatched when the user selects files from the dialog box opened by a call to the 
 browseForOpenMultiple() method.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><adobeApiEventDetail><adobeApiEventDef><apiEventType>flash.events.FileListEvent.SELECT_MULTIPLE</apiEventType><adobeApiEventClassifier>flash.events.FileListEvent</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>
 Dispatched when the user selects files from the dialog box opened by a call to the 
 <codeph>browseForOpenMultiple()</codeph> method. 
 
 
 </apiDesc></adobeApiEventDetail><related-links><link href="flash.filesystem.xml#File/browseForMultiple()"><linktext>browseForMultiple()</linktext></link></related-links></adobeApiEvent><adobeApiEvent id="flash.filesystem:File_flash.events.Event.SELECT_select"><apiName>select</apiName><shortdesc>
 Dispatched when the user selects a file or directory from a file- or directory-browsing dialog box.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><adobeApiEventDetail><adobeApiEventDef><apiEventType>flash.events.Event.SELECT</apiEventType><adobeApiEventClassifier>flash.events.Event</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>
 Dispatched when the user selects a file or directory from a file- or directory-browsing dialog box. 
 
 
 </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.filesystem:File_flash.events.SecurityErrorEvent.SECURITY_ERROR_securityError"><apiName>securityError</apiName><shortdesc>
 Dispatched when an operation violates a security constraint.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><adobeApiEventDetail><adobeApiEventDef><apiEventType>flash.events.SecurityErrorEvent.SECURITY_ERROR</apiEventType><adobeApiEventClassifier>flash.events.SecurityErrorEvent</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>
 Dispatched when an operation violates a security constraint.
 
 
 </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.filesystem:File_flash.events.IOErrorEvent.IO_ERROR_ioError"><apiName>ioError</apiName><shortdesc>
 Dispatched when an error occurs during an asynchronous file operation.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><adobeApiEventDetail><adobeApiEventDef><apiEventType>flash.events.IOErrorEvent.IO_ERROR</apiEventType><adobeApiEventClassifier>flash.events.IOErrorEvent</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>
 Dispatched when an error occurs during an asynchronous file operation.
 
 </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.filesystem:File_flash.events.Event.COMPLETE_complete"><apiName>complete</apiName><shortdesc>
 Dispatched when an asynchronous operation is complete.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><adobeApiEventDetail><adobeApiEventDef><apiEventType>flash.events.Event.COMPLETE</apiEventType><adobeApiEventClassifier>flash.events.Event</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>
 Dispatched when an asynchronous operation is complete.
 
 </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="flash.filesystem:File_flash.events.Event.CANCEL_cancel"><apiName>cancel</apiName><shortdesc>
 Dispatched when a pending asynchronous operation is canceled.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><adobeApiEventDetail><adobeApiEventDef><apiEventType>flash.events.Event.CANCEL</apiEventType><adobeApiEventClassifier>flash.events.Event</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>
 Dispatched when a pending asynchronous operation is canceled.
 
 </apiDesc></adobeApiEventDetail></adobeApiEvent><apiConstructor id="flash.filesystem:File:File"><apiName>File</apiName><shortdesc>
	The constructor function for the File class.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/><apiException><apiDesc>The syntax of the <codeph>path</codeph> parameter is invalid.
	
	</apiDesc><apiItemName>ArgumentError</apiItemName><apiOperationClassifier>ArgumentError</apiOperationClassifier></apiException><apiParam><apiItemName>path</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiData>null</apiData><apiDesc>The path to the file. You can specify the path by using either a URL or 
	native path (platform-specific) notation. 
	
	<p>If you specify a URL, you can use any of the following
	URL schemes: <codeph>file</codeph>, <codeph>app</codeph>, or 
	<codeph>app-storage</codeph>. The following are valid values for the <codeph>path</codeph>
	parameter using URL notation: </p>
	
	<ul>
	
		<li><codeph>"app:/DesktopPathTest.xml"</codeph></li> 
		<li><codeph>"app-storage:/preferences.xml"</codeph></li> 
		<li><codeph>"file:///C:/Documents%20and%20Settings/bob/Desktop"</codeph> (the desktop on Bob's Windows computer)</li>
		<li><codeph>"file:///Users/bob/Desktop"</codeph> (the desktop on Bob's Mac computer)</li>
	
	</ul>
	
	<p>The <codeph>app</codeph> and <codeph>app-storage</codeph> URL schemes 
	are useful because they can point to a valid file on all file systems. However, 
	in the other two examples, which use the <codeph>file</codeph> URL scheme to point to the 
	user's desktop directory, it would be better to pass <i>no</i> <codeph>path</codeph> argument  
	to the <codeph>File()</codeph> constructor and then assign <codeph>File.desktopDirectory</codeph>
	to the File object, as a way to access the desktop directory that is both platform- and
	user-independent.</p>
	
	<p>If you specify a native path, on Windows you can use either the backslash character or 
	the forward slash character as the path separator in this argument; on Mac OS and Linux, use the    
	forward slash. The following are valid values for the <codeph>path</codeph> parameter using 
	native path notation:</p>
	
	<ul>
	
		<li><codeph>"C:/Documents and Settings/bob/Desktop"</codeph></li>
		<li><codeph>"/Users/bob/Desktop"</codeph></li>
	
	</ul>
	
	<p>However, for these two examples, you should pass <i>no</i> <codeph>path</codeph> argument  
	to the <codeph>File()</codeph> constructor and then assign <codeph>File.desktopDirectory</codeph>
	to the File object, as a way to access the desktop directory that is both platform- and
	user-independent.</p>
	
	</apiDesc></apiParam></apiConstructorDef><apiDesc>
	The constructor function for the File class. 
	
	<p>If you pass a <codeph>path</codeph> argument, the
	File object points to the specified path, and the <codeph>nativePath</codeph> property and 
	and <codeph>url</codeph> property are set to reflect that path.</p>
	
	<p>Although you can pass a <codeph>path</codeph> argument to specify a file path, consider
	whether doing so may result in platform-specific code. For example, a native path such as
	<codeph>"C:\\\\Documents and Settings\\bob\\Desktop"</codeph> or a URL such as 
	<codeph>"file:///C:/Documents%20and%20Settings/bob/Desktop"</codeph> is only valid on Windows.
	It is far better to use the following static properties, which represent commonly used directories,
	and which are valid on all platforms:</p>
	
	<ul>
	<li><codeph>File.applicationDirectory</codeph></li>
	<li><codeph>File.applicationStorageDirectory</codeph></li>
	<li><codeph>File.desktopDirectory</codeph></li>
	<li><codeph>File.documentsDirectory</codeph></li>
	<li><codeph>File.userDirectory</codeph></li>
	</ul>
	
	<p>You can then use the <codeph>resolvePath()</codeph> method to get a path relative to these directories.
	For example, the following code sets up a File object to point to the settings.xml file in the application
	storage directory:</p>
	
	<codeblock platform="actionscript">var file:File = File.applicationStorageDirectory.resolvePath("settings.xml");</codeblock>
	
	<codeblock platform="javascript">var file = air.File.applicationStorageDirectory.resolvePath("settings.xml");</codeblock>
	
	</apiDesc></apiConstructorDetail><related-links><link href="flash.filesystem.xml#File/nativePath"><linktext>nativePath</linktext></link></related-links></apiConstructor><apiOperation id="flash.filesystem:File:browseForDirectory"><apiName>browseForDirectory</apiName><shortdesc>
	 Displays a directory chooser dialog box, in which the user can select a directory.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiType value="void"/></apiReturn><apiParam><apiItemName>title</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiDesc>The string that is diplayed in the title bar of the dialog box.
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Displays a directory chooser dialog box, in which the user can select a directory.
	 When the user selects the directory, the <codeph>select</codeph> event is dispatched.
	 The <codeph>target</codeph> property of the <codeph>select</codeph> event is the
	 File object pointing to the selected directory.
	 
	 </apiDesc><example conref="examples\File.browseForDirectory.1.as"> The following code uses the <codeph>File.browseForDirectory()</codeph> method to 
 let the user select a directory. When the directory is selected, the code lists the contents of
 the selected directory in the <codeph>trace()</codeph> output.
<codeblock>
import flash.filesystem.File;
import flash.events.Event;

var directory:File = File.documentsDirectory;

try
{
    directory.browseForDirectory("Select Directory");
    directory.addEventListener(Event.SELECT, directorySelected);
}
catch (error:Error)
{
    trace("Failed:", error.message);
}

function directorySelected(event:Event):void 
{
    directory = event.target as File;
    var files:Array = directory.getDirectoryListing();
    for(var i:uint = 0; i &lt; files.length; i++)
    {
        trace(files[i].name);
    }
}
</codeblock></example></apiOperationDetail><related-links><link href="flash.filesystem.xml#File/browseForOpen()"><linktext>browseForOpen()</linktext></link><link href="flash.filesystem.xml#File/browseForSave()"><linktext>browseForSave()</linktext></link><link href="flash.filesystem.xml#File/event:select"><linktext>select</linktext></link><link href="flash.net.xml#FileFilter"><linktext>flash.net.FileFilter</linktext></link></related-links><adobeApiEvent id="flash.filesystem:File:browseForDirectory_cancel"><apiName>cancel</apiName><prolog/><adobeApiEventDetail><adobeApiEventDef><adobeApiEventClassifier>flash.events:Event</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>Dispatched when the user clicks the Cancel button in the Open File dialog box. 
	 
	 </apiDesc></adobeApiEventDetail><shortdesc>Dispatched when the user clicks the Cancel button in the Open File dialog box.</shortdesc></adobeApiEvent><adobeApiEvent id="flash.filesystem:File:browseForDirectory_select"><apiName>select</apiName><prolog/><adobeApiEventDetail><adobeApiEventDef><adobeApiEventClassifier>flash.events:Event</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>Dispatched when the user selects a directory and closes the directory chooser dialog box. 
	 
	 </apiDesc></adobeApiEventDetail><shortdesc>Dispatched when the user selects a directory and closes the directory chooser dialog box.</shortdesc></adobeApiEvent></apiOperation><apiOperation id="flash.filesystem:File:browseForOpen"><apiName>browseForOpen</apiName><shortdesc>
	 Displays the Open File dialog box, in which the user can select a file to open.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiType value="void"/></apiReturn><apiParam><apiItemName>title</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiDesc>The string that is diplayed in the title bar of the dialog box.
	 
	 </apiDesc></apiParam><apiParam><apiItemName>typeFilter</apiItemName><apiOperationClassifier>Array</apiOperationClassifier><apiData>null</apiData><apiDesc>An array of FileFilter instances used to filter the files 
	 that are displayed in the dialog box. If you omit this parameter, all files are 
	 displayed. For more information, see the FileFilter class.
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Displays the Open File dialog box, in which the user can select a file to open.
	 
	 <p>When the user selects the file, the <codeph>select</codeph> event is dispatched.
	 The <codeph>target</codeph> property of the <codeph>select</codeph> event is the
	 File object pointing to the selected file.</p>
	 
	 </apiDesc><example conref="examples\File.browseForOpen.1.as"> The following code uses the <codeph>File.browseForOpen()</codeph> method to 
 let the user choose a text file. When the file is selected, the code reads the file data
 into a string.
<codeblock>
import flash.filesystem.*;
import flash.events.Event;
import flash.net.FileFilter;

var fileToOpen:File = new File();
var txtFilter:FileFilter = new FileFilter("Text", "*.as;*.css;*.html;*.txt;*.xml");

try 
{
    fileToOpen.browseForOpen("Open", [txtFilter]);
    fileToOpen.addEventListener(Event.SELECT, fileSelected);
}
catch (error:Error)
{
    trace("Failed:", error.message);
}

function fileSelected(event:Event):void 
{
    var stream:FileStream = new FileStream();
    stream.open(event.target, FileMode.READ);
    var fileData:String = stream.readUTFBytes(stream.bytesAvailable);
    trace(fileData);
}
</codeblock></example></apiOperationDetail><related-links><link href="flash.filesystem.xml#File/browseForSave()"><linktext>browseForSave()</linktext></link><link href="flash.filesystem.xml#File/browseForOpenMultiple()"><linktext>browseForOpenMultiple()</linktext></link><link href="flash.filesystem.xml#File/browseDirectory()"><linktext>browseDirectory()</linktext></link><link href="flash.filesystem.xml#File/event:select"><linktext>select</linktext></link><link href="flash.net.xml#FileFilter"><linktext>flash.net.FileFilter</linktext></link></related-links><adobeApiEvent id="flash.filesystem:File:browseForOpen_cancel"><apiName>cancel</apiName><prolog/><adobeApiEventDetail><adobeApiEventDef><adobeApiEventClassifier>flash.events:Event</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>Dispatched when the user clicks the Cancel button in the Open File dialog box. 
	 
	 </apiDesc></adobeApiEventDetail><shortdesc>Dispatched when the user clicks the Cancel button in the Open File dialog box.</shortdesc></adobeApiEvent><adobeApiEvent id="flash.filesystem:File:browseForOpen_select"><apiName>select</apiName><prolog/><adobeApiEventDetail><adobeApiEventDef><adobeApiEventClassifier>flash.events:Event</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>Dispatched when the user selects a file and closes the Open File dialog box. 
	 
	 </apiDesc></adobeApiEventDetail><shortdesc>Dispatched when the user selects a file and closes the Open File dialog box.</shortdesc></adobeApiEvent></apiOperation><apiOperation id="flash.filesystem:File:browseForOpenMultiple"><apiName>browseForOpenMultiple</apiName><shortdesc>
	 Displays the Open File dialog box, in which the user can select one or more files to open.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiType value="void"/></apiReturn><apiParam><apiItemName>title</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiDesc>The string that is diplayed in the title bar of the dialog box.
	 
	 </apiDesc></apiParam><apiParam><apiItemName>typeFilter</apiItemName><apiOperationClassifier>Array</apiOperationClassifier><apiData>null</apiData><apiDesc>An array of FileFilter instances used to filter the files 
	 that are displayed in the dialog box. If you omit this parameter, all files are 
	 displayed. For more information, see the FileFilter class.
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Displays the Open File dialog box, in which the user can select one or more files to open.
	 
	 <p>When the user selects the files, the <codeph>selectMultiple</codeph> event is dispatched.
	 The <codeph>target</codeph> property of the <codeph>select</codeph> event is this
	 File object.  Unlike <codeph>browseForOpen()</codeph>, with the <codeph>browseForOpenMultiple()</codeph> 
	 method, this File object is not updated to reference any of the chosen files. 
	 Instead, the resulting <codeph>selectMultiple</codeph> event contains an array of the chosen files.</p>
	 
	 </apiDesc><example conref="examples\File.browseForOpenMultiple.1.as"> The following code uses the <codeph>File.browseForOpenMultiple()</codeph> method to 
 let the user choose multiple files. When the files are selected, the code outputs the paths
 for the selected files.
<codeblock>
import flash.filesystem.*;
import flash.events.FileListEvent;

var docsDir:File = File.documentsDirectory;
try
{
    docsDir.browseForOpenMultiple("Select Files");
    docsDir.addEventListener(FileListEvent.SELECT_MULTIPLE, filesSelected);
}
catch (error:Error)
{
    trace("Failed:", error.message);
}

function filesSelected(event:FileListEvent):void 
{
    for (var i:uint = 0; i &lt; event.files.length; i++) 
    {
        trace(event.files[i].nativePath);
    }
}
</codeblock></example></apiOperationDetail><related-links><link href="flash.filesystem.xml#File/browseForSave()"><linktext>browseForSave()</linktext></link><link href="flash.filesystem.xml#File/browseForOpen()"><linktext>browseForOpen()</linktext></link><link href="flash.filesystem.xml#File/browseDirectory()"><linktext>browseDirectory()</linktext></link><link href="flash.filesystem.xml#File/event:selectMultiple"><linktext>selectMultiple</linktext></link><link href="flash.net.xml#FileFilter"><linktext>flash.net.FileFilter</linktext></link></related-links><adobeApiEvent id="flash.filesystem:File:browseForOpenMultiple_cancel"><apiName>cancel</apiName><prolog/><adobeApiEventDetail><adobeApiEventDef><adobeApiEventClassifier>flash.events:Event</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>Dispatched when the user clicks the Cancel button in the Open File dialog box. 
	 
	 </apiDesc></adobeApiEventDetail><shortdesc>Dispatched when the user clicks the Cancel button in the Open File dialog box.</shortdesc></adobeApiEvent><adobeApiEvent id="flash.filesystem:File:browseForOpenMultiple_selectMultiple"><apiName>selectMultiple</apiName><prolog/><adobeApiEventDetail><adobeApiEventDef><adobeApiEventClassifier>flash.events:FileListEvent</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>Dispatched when the user selects files and closes the Open File dialog box. 
	 
	 </apiDesc></adobeApiEventDetail><shortdesc>Dispatched when the user selects files and closes the Open File dialog box.</shortdesc></adobeApiEvent></apiOperation><apiOperation id="flash.filesystem:File:browseForSave"><apiName>browseForSave</apiName><shortdesc>
	 Displays the Save File dialog box, in which the user can select a file destination.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiType value="void"/></apiReturn><apiParam><apiItemName>title</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiDesc>The string that is diplayed in the title bar of the dialog box.
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Displays the Save File dialog box, in which the user can select a file destination. 
	 
	 <p>When the user selects the file, the <codeph>select</codeph> event is dispatched.
	 The <codeph>target</codeph> property of the <codeph>select</codeph> event is the
	 File object pointing to the selected Save destination.</p>
	 
	 </apiDesc><example conref="examples\File.browseForSave.1.as"> The following code uses the <codeph>File.browseForSave()</codeph> method to 
 let the user select a path for saving a file. When the files are selected, the code saves
 data to the selected file path.
<codeblock>
import flash.filesystem.*;
import flash.events.Event;

var docsDir:File = File.documentsDirectory;
try
{
    docsDir.browseForSave("Save As");
    docsDir.addEventListener(Event.SELECT, saveData);
}
catch (error:Error)
{
    trace("Failed:", error.message);
}

function saveData(event:Event):void 
{
    var newFile:File = event.target as File;
    var str:String = "Hello.";
    if (!newFile.exists)
    {
        var stream:FileStream = new FileStream();
        stream.open(newFile, FileMode.WRITE);
        stream.writeUTFBytes(str);
        stream.close();
    }
}
</codeblock></example></apiOperationDetail><related-links><link href="flash.filesystem.xml#File/browseDirectory()"><linktext>browseDirectory()</linktext></link><link href="flash.filesystem.xml#File/browseForOpen()"><linktext>browseForOpen()</linktext></link><link href="flash.filesystem.xml#File/event:select"><linktext>select</linktext></link><link href="flash.net.xml#FileFilter"><linktext>flash.net.FileFilter</linktext></link></related-links><adobeApiEvent id="flash.filesystem:File:browseForSave_cancel"><apiName>cancel</apiName><prolog/><adobeApiEventDetail><adobeApiEventDef><adobeApiEventClassifier>flash.events:Event</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>Dispatched when the user clicks the Cancel button in the Save File dialog box. 
	 
	 </apiDesc></adobeApiEventDetail><shortdesc>Dispatched when the user clicks the Cancel button in the Save File dialog box.</shortdesc></adobeApiEvent><adobeApiEvent id="flash.filesystem:File:browseForSave_select"><apiName>select</apiName><prolog/><adobeApiEventDetail><adobeApiEventDef><adobeApiEventClassifier>flash.events:Event</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>Dispatched when the user selects a file and closes the Save File dialog box. 
	 
	 </apiDesc></adobeApiEventDetail><shortdesc>Dispatched when the user selects a file and closes the Save File dialog box.</shortdesc></adobeApiEvent></apiOperation><apiOperation id="flash.filesystem:File:cancel"><apiName>cancel</apiName><shortdesc>
	 Cancels any pending asynchronous operation.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiIsOverride/><apiReturn><apiType value="void"/></apiReturn></apiOperationDef><apiDesc>
	 Cancels any pending asynchronous operation.
	 </apiDesc></apiOperationDetail></apiOperation><apiOperation id="flash.filesystem:File:canonicalize"><apiName>canonicalize</apiName><shortdesc>
	 Canonicalizes the File path.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiType value="void"/></apiReturn></apiOperationDef><apiDesc>
	 Canonicalizes the File path.
	 
	 <p>If the File object represents an existing file or directory, canonicalization 
	 adjusts the path so that it matches the case of the actual file or directory name.
	 If the File object is a symbolic link, canonicalization adjusts the path so that
	 it matches the file or directory that the link points to, regardless of whether the
	 file or directory that is pointed to exists. On case sensitive file systems
	 (such as Linux), when multiple files exists with names differing only in case, 
	 the <codeph>canonicalize()</codeph> method adjusts the path to
	 match the first file found (in an order determined by the file system).</p>
	 
	 <p>In addition, canonicalization converts short filesnames to long filenames on Windows.</p>
	 
	 </apiDesc><example conref="examples\File.canonicalize.2.as">     The following code shows how to use the <codeph>canonicalize()</codeph> method to find the 
 correct capitalization of a directory name. Before running this example, create a directory named AIR Test 
 on the desktop of your computer.
<codeblock>
import flash.filesystem.*;

var path:File = File.desktopDirectory.resolvePath("air test");
trace(path.nativePath); 
path.canonicalize();
trace(path.nativePath); // ...\AIR Test

</codeblock></example><example conref="examples\File.canonicalize.1.as">     The following code shows how to use the <codeph>canonicalize()</codeph> method to find the 
 long name of a Windows directory based on its short name. This example assumes that there is an AIR Test
 directory at the root of the C: drive, and that the system has assigned the short name AIR~1 to the directory.
<codeblock>
import flash.filesystem.*;

var path:File = new File();
path.nativePath = "C:\\AIR~1";
path.canonicalize();
trace(path.nativePath); // C:\AIR Test
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="flash.filesystem:File:clone"><apiName>clone</apiName><shortdesc>
	 Returns a copy of this File object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiOperationClassifier>flash.filesystem:File</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	 Returns a copy of this File object. Event registrations are not copied.
	 
	 <p><i>Note:</i> This method does <i>not</i> copy the file itself. It simply makes a 
	 copy of the instance of the <ph platform="actionscript">ActionScript</ph>
	 <ph platform="javascript">JavaScript</ph> File object. To copy a file, use the 
	 <codeph>copyTo()</codeph> method.</p>
	 
	 </apiDesc></apiOperationDetail></apiOperation><apiOperation id="flash.filesystem:File:copyTo"><apiName>copyTo</apiName><shortdesc>
	 Copies the file or directory at the location specified by this File object to 
	 the location specified by the newLocation parameter.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiException><apiDesc>The source does not exist; or the destination exists and <codeph>overwrite</codeph> is <codeph>false</codeph>; 
	 or the source could not be copied to the target; or the source and destination refer to the same file or folder and
	 <codeph>overwrite</codeph> is set to <codeph>true</codeph>. On Windows, you cannot copy a file that is open or a directory
	 that contains a file that is open.
	 
	 </apiDesc><apiItemName>IOError</apiItemName><apiOperationClassifier>flash.errors:IOError</apiOperationClassifier></apiException><apiReturn><apiType value="void"/></apiReturn><apiParam><apiItemName>newLocation</apiItemName><apiOperationClassifier>flash.net:FileReference</apiOperationClassifier><apiDesc>The target location of the new file. Note that this File object specifies
	 the resulting (copied) file or directory, <i>not</i> the path to the containing directory.
	 
	 </apiDesc></apiParam><apiParam><apiItemName>overwrite</apiItemName><apiOperationClassifier>Boolean</apiOperationClassifier><apiData>false</apiData><apiDesc>If <codeph>false</codeph>, the copy fails if the file specified by the <codeph>target</codeph>  
	 parameter already exists. If <codeph>true</codeph>, the operation overwrites existing file or directory 
	 of the same name.  
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Copies the file or directory at the location specified by this File object to 
	 the location specified by the <codeph>newLocation</codeph> parameter. The copy process 
	 creates any required parent directories (if possible).
	 
	 </apiDesc><example conref="examples\File.copyTo.1.as"> The following code shows how to use the <codeph>copyTo()</codeph> method to copy  a file. 
 Before running this code, create a test1.txt file in the AIR Test subdirectory of the documents directory on  
 your computer. The resulting copied file is named test2.txt, and it is also in the AIR Test subdirectory. When 
 you set the <codeph>clobber</codeph> parameter to <codeph>true</codeph>, the operation overwrites any existing test2.txt file.
<codeblock>
import flash.filesystem.File;
import flash.events.Event;

var sourceFile:FileReference = File.documentsDirectory;
sourceFile = sourceFile.resolvePath("AIR Test/test1.txt");
var destination:FileReference = File.documentsDirectory;
destination = destination.resolvePath("AIR Test/test2.txt");

if (sourceFile.copyTo(destination, true)) {
    trace("Done.");
}
</codeblock></example><example conref="examples\File.copyTo.2.as"> The following code shows how to use the <codeph>copyTo()</codeph> method to copy a file.
 Before running this code, create a test1.txt file in the AIR Test subdirectory of the home directory on your 
 computer. The resulting copied file is named test2.txt. The <codeph>try</codeph> and <codeph>catch</codeph> statements
 show how to respond to errors.
<codeblock>
import flash.filesystem.File;

var sourceFile:File = File.documentsDirectory;
sourceFile = sourceFile.resolvePath("AIR Test/test1.txt");
var destination:File = File.documentsDirectory;
destination = destination.resolvePath("AIR Test/test2.txt");

try 
{
    sourceFile.copyTo(destination, true);
}
catch (error:Error)
{
    trace("Error:", error.message);
}
</codeblock></example></apiOperationDetail><related-links><link href="flash.filesystem.xml#File/copyToAsync()"><linktext>copyToAsync()</linktext></link><link href="flash.filesystem.xml#File/moveTo()"><linktext>moveTo()</linktext></link></related-links></apiOperation><apiOperation id="flash.filesystem:File:copyToAsync"><apiName>copyToAsync</apiName><shortdesc>
	 Begins copying the file or directory at the location specified by this File object to 
	 the location specified by the destination parameter.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiType value="void"/></apiReturn><apiParam><apiItemName>newLocation</apiItemName><apiOperationClassifier>flash.net:FileReference</apiOperationClassifier><apiDesc>The target location of the new file. Note that this File object specifies
	 the resulting (copied) file or directory, <i>not</i> the path to the containing directory.
	 
	 </apiDesc></apiParam><apiParam><apiItemName>overwrite</apiItemName><apiOperationClassifier>Boolean</apiOperationClassifier><apiData>false</apiData><apiDesc>If <codeph>false</codeph>, the copy fails if the file specified by the <codeph>target</codeph>  
	 file already exists. If <codeph>true</codeph>, the operation overwrites any existing file or directory 
	 of the same name.
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Begins copying the file or directory at the location specified by this File object to 
	 the location specified by the <codeph>destination</codeph> parameter. 
	 
	 <p>Upon completion, either a <codeph>complete</codeph> event (successful) or an <codeph>ioError</codeph> event 
	 (unsucessful) is dispatched. The copy process creates any required parent directories (if possible).</p>
	 
	 </apiDesc><example conref="examples\File.copyToAsync.1.as"> The following code shows how to use the <codeph>copyToAsync()</codeph> method to copy a file.
 Before running this code, be sure to create a test1.txt file in the AIR Test subdirectory of the documents directory on your 
 computer. The resulting copied file is named test2.txt, and it is also in the AIR Test subdirectory. When you set the 
 <codeph>clobber</codeph> parameter to <codeph>true</codeph>, the operation overwrites any existing test2.txt file.
<codeblock>
import flash.filesystem.File;
import flash.events.Event;

var sourceFile:File = File.documentsDirectory;
sourceFile = sourceFile.resolvePath("AIR Test/test1.txt");
var destination:File = File.documentsDirectory;
destination = destination.resolvePath("AIR Test/test2.txt");

sourceFile.copyToAsync(destination, true);
sourceFile.addEventListener(Event.COMPLETE, fileCopiedHandler);

function fileCopiedHandler(event:Event):void {
    trace("Done.");
}
</codeblock></example></apiOperationDetail><related-links><link href="flash.filesystem.xml#File/copyTo()"><linktext>copyTo()</linktext></link><link href="flash.filesystem.xml#File/moveToAsync()"><linktext>moveToAsync()</linktext></link></related-links><adobeApiEvent id="flash.filesystem:File:copyToAsync_complete"><apiName>complete</apiName><prolog/><adobeApiEventDetail><adobeApiEventDef><adobeApiEventClassifier>flash.events:Event</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>Dispatched when the file or directory has been successfully copied. 
	 
	 </apiDesc></adobeApiEventDetail><shortdesc>Dispatched when the file or directory has been successfully copied.</shortdesc></adobeApiEvent><adobeApiEvent id="flash.filesystem:File:copyToAsync_ioError"><apiName>ioError</apiName><prolog/><adobeApiEventDetail><adobeApiEventDef><adobeApiEventClassifier>flash.events:IOErrorEvent</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>The source does not exist; or the destination exists and <codeph>overwrite</codeph> 
	 is <codeph>false</codeph>; or the source could not be copied to the target; or the source and destination refer 
	 to the same file or folder and <codeph>overwrite</codeph> is set to <codeph>true</codeph>.  On Windows, you cannot 
	 copy a file that is open or a directory that contains a file that is open.
	 
	 </apiDesc></adobeApiEventDetail><shortdesc>The source does not exist; or the destination exists and overwrite 
	 is false; or the source could not be copied to the target; or the source and destination refer 
	 to the same file or folder and overwrite is set to true.</shortdesc></adobeApiEvent></apiOperation><apiOperation id="flash.filesystem:File:createDirectory"><apiName>createDirectory</apiName><shortdesc>
	 Creates the specified directory and any necessary parent directories.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiException><apiDesc>The directory did not exist and could not be created. 
	 
	 </apiDesc><apiItemName>IOError</apiItemName><apiOperationClassifier>flash.errors:IOError</apiOperationClassifier></apiException><apiReturn><apiType value="void"/></apiReturn></apiOperationDef><apiDesc>
	 Creates the specified directory and any necessary parent directories. If the 
	 directory already exists, no action is taken.
	 
	 </apiDesc><example conref="examples\File.createDirectory.1.as">     The following code moves a file named test.txt on the desktop to the AIR Test 
 subdirectory of the documents directory. The call to the <codeph>createDirectory()</codeph> method 
 ensures that the AIR Test directory exists before the file is moved.
<codeblock>
import flash.filesystem.*;

var source:File = File.desktopDirectory.resolvePath("test.txt");
var target:File = File.documentsDirectory.resolvePath("AIR Test/test.txt");
var targetParent:File = target.parent;
targetParent.createDirectory();
source.moveTo(target, true);
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="flash.filesystem:File:createTempDirectory"><apiName>createTempDirectory</apiName><shortdesc>
	 Returns a reference to a new temporary directory.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiStatic/><apiReturn><apiDesc>A File object referencing the new temporary directory.
	 
	 </apiDesc><apiOperationClassifier>flash.filesystem:File</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	 Returns a reference to a new temporary directory. This is a new directory
	 in the system's temporary directory path.
	 
	 <p>This method lets you identify a new, unique directory, without having to
	 query the system to see that the directory is new and unique.</p>
	 
	 <p>You may want to delete the temporary directory before closing the application, 
	 since it is not deleted automatically.</p>
	 
	 </apiDesc><example conref="examples\File.createTempDirectory.1.as"> The following code uses the <codeph>createTempFile()</codeph> method to obtain a 
 reference to a new temporary directory.
<codeblock>
import flash.File;

var temp:File = File.createTempDirectory();
trace(temp.nativePath);
</codeblock> Each time you run this code, a new (unique) file is created. 
</example></apiOperationDetail><related-links><link href="flash.filesystem.xml#File/createTempFile()"><linktext>createTempFile()</linktext></link></related-links></apiOperation><apiOperation id="flash.filesystem:File:createTempFile"><apiName>createTempFile</apiName><shortdesc>
	 Returns a reference to a new temporary file.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiStatic/><apiReturn><apiDesc>A File object referencing the new temporary file.
	 
	 </apiDesc><apiOperationClassifier>flash.filesystem:File</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	 Returns a reference to a new temporary file. This is a new file
	 in the system's temporary directory path.
	 
	 <p>This method lets you identify a new, unique file, without having to
	 query the system to see that the file is new and unique.</p>
	 
	 <p>You may want to delete the temporary file before closing the application, 
	 since it is not deleted automatically.</p>
	 
	 </apiDesc><example conref="examples\File.createTempFile.1.as"> The following code uses the <codeph>createTempFile()</codeph> method to obtain a 
 reference to a new temporary file.
<codeblock>
import flash.File;

var temp:File = File.createTempFile();
trace(temp.nativePath);
</codeblock> Each time you run this code, a new (unique) file is created. 
</example></apiOperationDetail><related-links><link href="flash.filesystem.xml#File/createTempDirectory()"><linktext>createTempDirectory()</linktext></link></related-links></apiOperation><apiOperation id="flash.filesystem:File:deleteDirectory"><apiName>deleteDirectory</apiName><shortdesc>
	 Deletes the directory.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiException><apiDesc>The directory does not exist, or the directory could not be deleted. On Windows, 
	 you cannot delete a directory that contains a file that is open.
	 
	 </apiDesc><apiItemName>IOError</apiItemName><apiOperationClassifier>flash.errors:IOError</apiOperationClassifier></apiException><apiReturn><apiType value="void"/></apiReturn><apiParam><apiItemName>deleteDirectoryContents</apiItemName><apiOperationClassifier>Boolean</apiOperationClassifier><apiData>false</apiData><apiDesc>Specifies whether or not to delete a directory that contains files or
	 subdirectories. When <codeph>false</codeph>, if the directory contains files or directories, a call to
	 this method throws an exception.
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Deletes the directory. If this File is actually a symbolic link to a directory,
	 then the link, and not the directory, is removed.
	 
	 </apiDesc><example conref="examples\File.deleteDirectory.1.as"> The following code creates an empty directory and then uses the 
 <codeph>deleteDirectory()</codeph> method to delete the directory. 
<codeblock>
import flash.filesystem.File;

var directory:File = File.documentsDirectory.resolvePath("Empty Junk Directory/");
File.createDirectory(directory);
trace(directory.exists); // true
directory.deleteDirectory();
trace(directory.exists); // false
</codeblock></example></apiOperationDetail><related-links><link href="flash.filesystem.xml#File/deleteDirectoryAsync()"><linktext>deleteDirectoryAsync()</linktext></link><link href="flash.filesystem.xml#File/deleteFile()"><linktext>deleteFile()</linktext></link><link href="flash.filesystem.xml#File/moveToTrash()"><linktext>moveToTrash()</linktext></link></related-links></apiOperation><apiOperation id="flash.filesystem:File:deleteDirectoryAsync"><apiName>deleteDirectoryAsync</apiName><shortdesc>
	 Deletes the directory asynchronously.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiType value="void"/></apiReturn><apiParam><apiItemName>deleteDirectoryContents</apiItemName><apiOperationClassifier>Boolean</apiOperationClassifier><apiData>false</apiData><apiDesc>Specifies whether or not to delete a directory that contains files or
	 subdirectories. When <codeph>false</codeph>, if the directory contains files or directories, 
	 the File object dispatches an <codeph>ioError</codeph> event.
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Deletes the directory asynchronously. If this File is actually a symbolic link to a directory,
	 then the link, and not the directory, is removed.
	 
	 </apiDesc></apiOperationDetail><related-links><link href="flash.filesystem.xml#File/deleteDirectory()"><linktext>deleteDirectory()</linktext></link><link href="flash.filesystem.xml#File/deleteFileAsync()"><linktext>deleteFileAsync()</linktext></link><link href="flash.filesystem.xml#File/moveToTrashAsync()"><linktext>moveToTrashAsync()</linktext></link></related-links><adobeApiEvent id="flash.filesystem:File:deleteDirectoryAsync_complete"><apiName>complete</apiName><prolog/><adobeApiEventDetail><adobeApiEventDef><adobeApiEventClassifier>flash.events:Event</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>Dispatched when the directory has been deleted successfully. 
	 
	 </apiDesc></adobeApiEventDetail><shortdesc>Dispatched when the directory has been deleted successfully.</shortdesc></adobeApiEvent><adobeApiEvent id="flash.filesystem:File:deleteDirectoryAsync_ioError"><apiName>ioError</apiName><prolog/><adobeApiEventDetail><adobeApiEventDef><adobeApiEventClassifier>flash.events:IOErrorEvent</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>The directory does not exist or could not be deleted. On Windows, 
	 you cannot delete a directory that contains a file that is open.
	 
	 </apiDesc></adobeApiEventDetail><shortdesc>The directory does not exist or could not be deleted.</shortdesc></adobeApiEvent></apiOperation><apiOperation id="flash.filesystem:File:deleteFile"><apiName>deleteFile</apiName><shortdesc>
	 Deletes the file.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiException><apiDesc>The file does not exist or could not to be deleted. On Windows, 
	 you cannot delete a file that is currently open.
	 
	 </apiDesc><apiItemName>IOError</apiItemName><apiOperationClassifier>flash.errors:IOError</apiOperationClassifier></apiException><apiReturn><apiType value="void"/></apiReturn></apiOperationDef><apiDesc>
	 Deletes the file. If this File is actually a symbolic link, then the link,
	 not the target file, is removed.
	 
	 </apiDesc><example conref="examples\File.deleteFile.1.as"> The following code creates a temporary file and then calls the <codeph>deleteFile()</codeph>
 method to delete it.
<codeblock>
import flash.filesystem.*;

var file:File = File.createTempFile();
trace(file.exists); // true
file.deleteFile();
trace(file.exists); // false
</codeblock></example></apiOperationDetail><related-links><link href="flash.filesystem.xml#File/deleteDirectory()"><linktext>deleteDirectory()</linktext></link><link href="flash.filesystem.xml#File/deleteFileAsync()"><linktext>deleteFileAsync()</linktext></link><link href="flash.filesystem.xml#File/moveToTrash()"><linktext>moveToTrash()</linktext></link></related-links></apiOperation><apiOperation id="flash.filesystem:File:deleteFileAsync"><apiName>deleteFileAsync</apiName><shortdesc>
	 Deletes the file asynchronously.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiType value="void"/></apiReturn></apiOperationDef><apiDesc>
	 Deletes the file asynchronously. If this File is actually a symbolic link, then the link,
	 not the target file, is removed.
	 
	 </apiDesc></apiOperationDetail><related-links><link href="flash.filesystem.xml#File/deleteDirectoryAsync()"><linktext>deleteDirectoryAsync()</linktext></link><link href="flash.filesystem.xml#File/deleteFile()"><linktext>deleteFile()</linktext></link><link href="flash.filesystem.xml#File/moveToTrashAsync()"><linktext>moveToTrashAsync()</linktext></link></related-links><adobeApiEvent id="flash.filesystem:File:deleteFileAsync_complete"><apiName>complete</apiName><prolog/><adobeApiEventDetail><adobeApiEventDef><adobeApiEventClassifier>flash.events:Event</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>Dispatched when the file has been deleted successfully. 
	 
	 </apiDesc></adobeApiEventDetail><shortdesc>Dispatched when the file has been deleted successfully.</shortdesc></adobeApiEvent><adobeApiEvent id="flash.filesystem:File:deleteFileAsync_ioError"><apiName>ioError</apiName><prolog/><adobeApiEventDetail><adobeApiEventDef><adobeApiEventClassifier>flash.events:IOErrorEvent</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>The file does not exist or could not be deleted. On Windows,
	 you cannot delete a file that is currently open.
	 
	 </apiDesc></adobeApiEventDetail><shortdesc>The file does not exist or could not be deleted.</shortdesc></adobeApiEvent></apiOperation><apiOperation id="flash.filesystem:File:getDirectoryListing"><apiName>getDirectoryListing</apiName><shortdesc>
	 Returns an array of File objects corresponding to files and directories in the directory represented by this
	 File object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiDesc>An array of File objects.
	 
	 </apiDesc><apiOperationClassifier>Array</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	 Returns an array of File objects corresponding to files and directories in the directory represented by this
	 File object. This method does not explore the contents of subdirectories.
	 
	 </apiDesc><example conref="examples\File.getDirectoryListing.1.as"> The following code shows how to use the <codeph>getDirectoryListing()</codeph> method to 
 enumerate the contents of the user directory.
<codeblock>
import flash.filesystem.File;

var directory:File = File.userDirectory;
var list:Array = directory.getDirectoryListing();
for (var i:uint = 0; i &lt; list.length; i++) {
    trace(list[i].nativePath);
}
</codeblock></example></apiOperationDetail><related-links><link href="flash.filesystem.xml#File/getDirectoryListingAsync()"><linktext>getDirectoryListingAsync()</linktext></link><link href="flash.filesystem.xml#File/getRootDirectories()"><linktext>getRootDirectories()</linktext></link></related-links></apiOperation><apiOperation id="flash.filesystem:File:getDirectoryListingAsync"><apiName>getDirectoryListingAsync</apiName><shortdesc>
	 Asynchronously retrieves an array of File objects corresponding to the contents of the directory represented
	 by this File object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiType value="void"/></apiReturn></apiOperationDef><apiDesc>
	 Asynchronously retrieves an array of File objects corresponding to the contents of the directory represented
	 by this File object. 
	 
	 </apiDesc><example conref="examples\File.getDirectoryListingAsync.1.as"> The following code shows how to use the <codeph>getDirectoryListingAsync()</codeph> method to 
 enumerate the contents of the user directory.
<codeblock>
import flash.filesystem.File;
import flash.events.FileListEvent;

var directory:File = File.userDirectory;
directory.getDirectoryListingAsync();
directory.addEventListener(FileListEvent.DIRECTORY_LISTING, directoryListingHandler);

function directoryListingHandler(event:FileListEvent):void {
    var list:Array = event.files;
    for (var i:uint = 0; i &lt; list.length; i++) {
        trace(list[i].nativePath);
    }
}
</codeblock></example></apiOperationDetail><related-links><link href="flash.filesystem.xml#File/getDirectoryListing()"><linktext>getDirectoryListing()</linktext></link><link href="flash.filesystem.xml#File/getRootDirectories()"><linktext>getRootDirectories()</linktext></link><link href="flash.filesystem.xml#File/event:directoryListing"><linktext>directoryListing event</linktext></link></related-links><adobeApiEvent id="flash.filesystem:File:getDirectoryListingAsync_ioError"><apiName>ioError</apiName><prolog/><adobeApiEventDetail><adobeApiEventDef><adobeApiEventClassifier>flash.events:ErrorEvent</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>You do not have adequate permissions to read this directory, or the directory does
	 not exist.
	 
	 </apiDesc></adobeApiEventDetail><shortdesc>You do not have adequate permissions to read this directory, or the directory does
	 not exist.</shortdesc></adobeApiEvent><adobeApiEvent id="flash.filesystem:File:getDirectoryListingAsync_directoryListing"><apiName>directoryListing</apiName><prolog/><adobeApiEventDetail><adobeApiEventDef><adobeApiEventClassifier>flash.events:FileListEvent</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>The directory contents have been enumerated successfully. The 
	 <codeph>contents</codeph> event includes a <codeph>files</codeph> property, which is the resulting array of File objects.
	 
	 </apiDesc></adobeApiEventDetail><shortdesc>The directory contents have been enumerated successfully.</shortdesc></adobeApiEvent></apiOperation><apiOperation id="flash.filesystem:File:getRelativePath"><apiName>getRelativePath</apiName><shortdesc>
	 Finds the relative path between two File paths.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiException><apiDesc>The reference is <codeph>null</codeph>.
	 
	 </apiDesc><apiItemName>ArgumentError</apiItemName><apiOperationClassifier>ArgumentError</apiOperationClassifier></apiException><apiException><apiDesc>The caller is not in the application security sandbox.
	 
	 </apiDesc><apiItemName>SecurityError</apiItemName><apiOperationClassifier>SecurityError</apiOperationClassifier></apiException><apiReturn><apiDesc>The relative path between this file (or directory) and the <codeph>ref</codeph> file 
	 (or directory), if possible; otherwise <codeph>null</codeph>.
	 
	 </apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn><apiParam><apiItemName>ref</apiItemName><apiOperationClassifier>flash.net:FileReference</apiOperationClassifier><apiDesc> A File object against which the path is given.
	 
	 </apiDesc></apiParam><apiParam><apiItemName>useDotDot</apiItemName><apiOperationClassifier>Boolean</apiOperationClassifier><apiData>false</apiData><apiDesc> Specifies whether the resulting relative path can use ".." components.
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Finds the relative path between two File paths.
	 
	 <p>The relative path is the list of components that can be appended to
	 (resolved against) this reference in order to locate the second (parameter)
	 reference. The relative path is returned using the "/" separator character.</p>
	 
	 <p>Optionally, relative paths may include ".." references, but such paths
	 will not cross conspicuous volume boundaries.</p>
	 
	 </apiDesc><example conref="examples\File.getRelativePath.1.as"/></apiOperationDetail></apiOperation><apiOperation id="flash.filesystem:File:getRootDirectories"><apiName>getRootDirectories</apiName><shortdesc>
	 Returns an array of File objects, listing the file system root directories.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiStatic/><apiReturn><apiDesc>An array of File objects, listing the root directories. 
	 
	 </apiDesc><apiOperationClassifier>Array</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	 Returns an array of File objects, listing the file system root directories. 
	 
	 <p>For example, on Windows this is a list of volumes such as the C: drive and the 
	 D: drive. An empty drive, such as a CD or DVD drive in which no disc is inserted, 
	 is not included in this array. On Mac OS and Linux, this method always returns the 
	 unique root directory for the machine (the "/" directory)</p>
	 
	 </apiDesc><example conref="examples\File.getRootDirectories.1.as"> The following code outputs a list of root directories:
<codeblock>
import flash.filesystem.File;
var rootDirs:Array = File.getRootDirectories();

for (var i:uint = 0; i &lt; rootDirs.length; i++) {
    trace(rootDirs[i].nativePath);
}
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="flash.filesystem:File:moveTo"><apiName>moveTo</apiName><shortdesc>
	 Moves the file or directory at the location specified by this File object to 
	 the location specified by the destination parameter.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiException><apiDesc>The source does not exist; or the destination exists and <codeph>overwrite</codeph> is 
	 set to <codeph>false</codeph>; or the source file or directory could not be moved to the target location; 
	 or the source and destination refer to the same file or folder and <codeph>overwrite</codeph> is set to 
	 <codeph>true</codeph>. On Windows, you cannot move a file that is open or a directory that contains a file 
	 that is open.
	 
	 </apiDesc><apiItemName>IOError</apiItemName><apiOperationClassifier>flash.errors:IOError</apiOperationClassifier></apiException><apiReturn><apiType value="void"/></apiReturn><apiParam><apiItemName>newLocation</apiItemName><apiOperationClassifier>flash.net:FileReference</apiOperationClassifier><apiDesc>The target location for the move. This object specifies the path to the resulting
	 (moved) file or directory, <i>not</i> the path to the containing directory.
	 
	 </apiDesc></apiParam><apiParam><apiItemName>overwrite</apiItemName><apiOperationClassifier>Boolean</apiOperationClassifier><apiData>false</apiData><apiDesc>If <codeph>false</codeph>, the move fails if the <codeph>target</codeph> file 
	 already exists. If <codeph>true</codeph>, the operation overwrites any existing file or directory 
	 of the same name. 
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Moves the file or directory at the location specified by this File object to 
	 the location specified by the <codeph>destination</codeph> parameter. 
	 
	 <p>To rename a file, set the <codeph>destination</codeph> parameter to point to a path that is 
	 in the file's directory, but with a different filename.</p>
	 
	 <p>The move process creates any required parent directories (if possible).</p>
	 
	 </apiDesc><example conref="examples\File.moveTo.1.as"> The following code shows how to use the <codeph>moveTo()</codeph> method to rename
 a file. The original filename is test1.txt and the resulting filename is test2.txt. Since both the source and destination File
 object point to the same directory (the Apollo Test subdirectory of the user's documents directory), the 
 <codeph>moveTo()</codeph> method renames the file, rather than moving it to a new directory. Before running 
 this code, create a test1.txt file in the AIR Test subdirectory of the documents directory on your 
 computer. When you set the <codeph>clobber</codeph> parameter to <codeph>true</codeph>, the operation overwrites 
 any existing test2.txt file.
<codeblock>

import flash.filesystem.File;
import flash.events.Event;

var sourceFile:File = File.documentsDirectory;
sourceFile = sourceFile.resolvePath("AIR Test/test1.txt");
var destination:File = File.documentsDirectory;
destination = destination.resolvePath("Apollo Test/test2.txt");

try  
{
    sourceFile.moveTo(destination, true);
}
catch (error:Error)
{
    trace("Error:" error.message);
}
</codeblock></example><example conref="examples\File.moveTo.2.as"> The following code shows how to use the <codeph>moveTo()</codeph> method to move a file.
 The original file is the test1.txt file in the Apollo Test subdirectory of the user's documents directory, 
 and the method moves the file to the Results subdirectory. Before running this code, create a 
 test1.txt file in the AIR Test subdirectory of the home directory on your computer. The <codeph>try</codeph> 
 and <codeph>catch</codeph> statements show how to respond to errors.
<codeblock>
import flash.filesystem.File;

var sourceFile:File = File.documentsDirectory;
sourceFile = sourceFile.resolvePath("AIR Test/test1.txt");
var destination:File = File.documentsDirectory;
destination = destination.resolvePath("AIR Test/Results/test1.txt");

try 
{
    sourceFile.moveTo(destination, true);
}
catch (error:Error)
{
    trace("Error:" error.message);
}
</codeblock></example></apiOperationDetail><related-links><link href="flash.filesystem.xml#File/copyTo()"><linktext>copyTo()</linktext></link><link href="flash.filesystem.xml#File/moveToAsync()"><linktext>moveToAsync()</linktext></link><link href="flash.filesystem.xml#File/moveToTrash()"><linktext>moveToTrash()</linktext></link></related-links></apiOperation><apiOperation id="flash.filesystem:File:moveToAsync"><apiName>moveToAsync</apiName><shortdesc>
	 Begins moving the file or directory at the location specified by this File object to 
	 the location specified by the newLocation parameter.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiType value="void"/></apiReturn><apiParam><apiItemName>newLocation</apiItemName><apiOperationClassifier>flash.net:FileReference</apiOperationClassifier><apiDesc>The target location for the move. This object specifies the path to the resulting
	 (moved) file or directory, <i>not</i> the path to the containing directory.
	 
	 </apiDesc></apiParam><apiParam><apiItemName>overwrite</apiItemName><apiOperationClassifier>Boolean</apiOperationClassifier><apiData>false</apiData><apiDesc>If <codeph>false</codeph>, the move fails if the <codeph>target</codeph> file 
	 already exists. If <codeph>true</codeph>, the operation overwrites any existing file or directory 
	 of the same name.
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Begins moving the file or directory at the location specified by this File object to 
	 the location specified by the <codeph>newLocation</codeph> parameter. 
	 
	 <p>To rename a file, set the <codeph>destination</codeph> parameter to point to a path that is 
	 in the file's directory, but with a different filename.</p>
	 
	 <p>The move process creates any required parent directories (if possible).</p>
	 
	 </apiDesc><example conref="examples\File.moveToAsync.1.as"> The following code shows how to use the <codeph>moveToAsync()</codeph> method to rename a 
 file. The original filename is test1.txt and the resulting name is test2.txt. Since both the source and destination File
 object point to the same directory (the Apollo Test subdirectory of the user's documents directory), the 
 <codeph>moveToAsync()</codeph> method renames the file, rather than moving it to a new directory.
 Before running this code, create a test1.txt file in the Apollo Test subdirectory of the documents directory on your 
 computer. When you set <codeph>clobber</codeph> parameter to <codeph>true</codeph>, the operation overwrites any 
 existing test2.txt file.
<codeblock>
import flash.filesystem.File;
import flash.events.Event;

var sourceFile:File = File.documentsDirectory;
sourceFile = sourceFile.resolvePath("Apollo Test/test1.txt");
var destination:File = File.documentsDirectory;
destination = destination.resolvePath("Apollo Test/test2.txt");

var sourceFile.moveToAsync(destination, true);
sourceFile.addEventListener(Event.COMPLETE, fileMoveCompleteHandler);

function fileMoveCompleteHandler(event:Event):void 
{
    trace("Done.")
}
</codeblock></example></apiOperationDetail><related-links><link href="flash.filesystem.xml#File/copyToAsync()"><linktext>copyToAsync()</linktext></link><link href="flash.filesystem.xml#File/moveTo()"><linktext>moveTo()</linktext></link><link href="flash.filesystem.xml#File/moveToTrashAsync()"><linktext>moveToTrashAsync()</linktext></link></related-links><adobeApiEvent id="flash.filesystem:File:moveToAsync_complete"><apiName>complete</apiName><prolog/><adobeApiEventDetail><adobeApiEventDef><adobeApiEventClassifier>flash.events:Event</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>Dispatched when the file or directory has been successfully moved. 
	 
	 </apiDesc></adobeApiEventDetail><shortdesc>Dispatched when the file or directory has been successfully moved.</shortdesc></adobeApiEvent><adobeApiEvent id="flash.filesystem:File:moveToAsync_ioError"><apiName>ioError</apiName><prolog/><adobeApiEventDetail><adobeApiEventDef><adobeApiEventClassifier>flash.events:IOErrorEvent</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>The source does not exist; or the destination exists and <codeph>overwrite</codeph> 
	 is <codeph>false</codeph>; or the source could not be moved to the target;  or the source and destination refer 
	 to the same file or folder and <codeph>overwrite</codeph> is set to <codeph>true</codeph>. On Windows, you cannot move 
	 a file that is open or a directory that contains a file that is  open.
	 
	 </apiDesc></adobeApiEventDetail><shortdesc>The source does not exist; or the destination exists and overwrite 
	 is false; or the source could not be moved to the target;  or the source and destination refer 
	 to the same file or folder and overwrite is set to true.</shortdesc></adobeApiEvent></apiOperation><apiOperation id="flash.filesystem:File:moveToTrash"><apiName>moveToTrash</apiName><shortdesc>
	 Moves a file or directory to the trash.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><internal>TBC: what to do when Trash is not supported?  SB part of general policy about optional system facilities.
	 </internal></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiException><apiDesc>The operating system did not allow the operation; or the file
	 or directory does not exist. On Windows, you cannot move a file that is open or a directory
	 that contains a file that is currently open.
	 
	 </apiDesc><apiItemName>IOError</apiItemName><apiOperationClassifier>flash.errors:IOError</apiOperationClassifier></apiException><apiReturn><apiType value="void"/></apiReturn></apiOperationDef><apiDesc>
	 Moves a file or directory to the trash.
	 
	 </apiDesc></apiOperationDetail><related-links><link href="flash.filesystem.xml#File/moveToTrashAsync()"><linktext>moveToTrashAsync()</linktext></link></related-links></apiOperation><apiOperation id="flash.filesystem:File:moveToTrashAsync"><apiName>moveToTrashAsync</apiName><shortdesc>
	 Asynchronously moves a file or directory to the trash.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><internal>TBC: what to do when Trash is not supported?  SB part of general policy about optional system facilities.
	 </internal></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiType value="void"/></apiReturn></apiOperationDef><apiDesc>
	 Asynchronously moves a file or directory to the trash. 
	 
	 </apiDesc></apiOperationDetail><related-links><link href="flash.filesystem.xml#File/moveToTrash()"><linktext>moveToTrash()</linktext></link></related-links><adobeApiEvent id="flash.filesystem:File:moveToTrashAsync_ioError"><apiName>ioError</apiName><prolog/><adobeApiEventDetail><adobeApiEventDef><adobeApiEventClassifier>flash.events:IOErrorEvent</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>The operating system did not allow the operation; or the file
	 or directory does not exist. On Windows, you cannot move a file that is open or a directory
	 that contains a file that is currently open.
	 
	 </apiDesc></adobeApiEventDetail><shortdesc>The operating system did not allow the operation; or the file
	 or directory does not exist.</shortdesc></adobeApiEvent><adobeApiEvent id="flash.filesystem:File:moveToTrashAsync_complete"><apiName>complete</apiName><prolog/><adobeApiEventDetail><adobeApiEventDef><adobeApiEventClassifier>flash.events:Event</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc>Dispatched when the file or directory has been successfully moved to the trash. 
	 
	 </apiDesc></adobeApiEventDetail><shortdesc>Dispatched when the file or directory has been successfully moved to the trash.</shortdesc></adobeApiEvent></apiOperation><apiOperation id="flash.filesystem:File:resolvePath"><apiName>resolvePath</apiName><shortdesc>
	 Creates a new File object with a path relative to this File object's path, based on the 
	 path parameter (a string).</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiDesc>A new File object pointing to the resulting path.
	 
	 </apiDesc><apiOperationClassifier>flash.filesystem:File</apiOperationClassifier></apiReturn><apiParam><apiItemName>path</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiDesc>The path to append to this File object's path (if the <codeph>path</codeph> parameter 
	 is a relative path); or the path to return (if the <codeph>path</codeph> parameter is an absolute
	 path).
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Creates a new File object with a path relative to this File object's path, based on the 
	 <codeph>path</codeph> parameter (a string).
	 
	 <p>You can use a relative path or absolute path as the <codeph>path</codeph> parameter.</p>
	 
	 <p>If you specify a relative path, the given <codeph>path</codeph> is "appended" 
	 to the path of the File object. However, use of ".." in the <codeph>path</codeph>
	 can return a resulting path that is not a child of the File object. The resulting reference need not 
	 refer to an actual file system location.</p>
	 
	 <p>If you specify an absolute file reference, the method returns the File object pointing to that
	 path. The absolute file reference should use valid native path syntax for the user's operating 
	 system (such as <codeph>"C:\\test"</codeph> on Windows). Do <i>not</i> use a URL (such as 
	 <codeph>"file:///c:/test"</codeph>) as the <codeph>path</codeph> parameter.</p>
	 
	 <p>All resulting paths are normalized as follows: </p>
	 
	 <ul>
	 
	 	<li>Any "." element is ignored.</li>
	 
	 	<li>Any ".." element consumes its parent entry.  </li>
	 
	 	<li>No ".." reference that reaches the file system root or the application-persistent
	 			 storage root passes that node; it is ignored.</li>
	 
	 </ul>
	 
	 <p>You should always use the forward slash (<codeph>/</codeph>) character as the path separator. 
	 On Windows, you can also use the backslash (<codeph>\</codeph>) character, but doing so can lead
	 to applications that do not work on other platforms.</p>
	 
	 <p>Filenames and directory names are case-sensitive on Linux.</p>
	 
	 </apiDesc></apiOperationDetail></apiOperation><apiValue id="flash.filesystem:File:applicationDirectory:get"><apiName>applicationDirectory</apiName><shortdesc>
	 The folder containing the application's installed files.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiStatic/><apiValueAccess value="read"/><apiValueClassifier>flash.filesystem:File</apiValueClassifier></apiValueDef><apiDesc>
	 The folder containing the application's installed files.
	 
	 <p>The <codeph>url</codeph> property for this object uses the <codeph>app</codeph> URL scheme 
	 (not the <codeph>file</codeph> URL scheme). This means that the <codeph>url</codeph> string is specified starting 
	 with <codeph>"app:"</codeph> (not <codeph>"file:"</codeph>). Also, if you create a File object relative to the 
	 <codeph>File.applicationDirectory</codeph> directory (by using the <codeph>resolvePath()</codeph> method), 
	 the <codeph>url</codeph> property of the File object also uses the <codeph>app</codeph> URL scheme. 
	 </p>
	 
	 <p><i>Note:</i> You cannot write to files or directories that have paths that use the <codeph>app</codeph>
	 URL scheme. Also, you cannot delete or create files or folders that have paths that use the <codeph>app</codeph>
	 URL scheme. Modifying content in the application directory is a bad practice, for security reasons.
	 If you want to store application-specific data, consider using the application storage directory 
	 (<codeph>File.applicationStorageDirectory</codeph>). If you want any of the content in the application storage directory
	 to have access to the application-priveleged functionality (AIR APIs), you can expose that functionality
	 by using a sandbox bridge.</p>
	 
	 <p>The <codeph>applicationDirectory</codeph> property provides a way to reference the 
	 application directory that works across platforms. If you set a File object to reference 
	 the application directory using the <codeph>nativePath</codeph> or <codeph>url</codeph> property, 
	 it will only work on the platform for which that path is valid.</p>
	 
	 </apiDesc></apiValueDetail><related-links><link href="flash.filesystem.xml#File/applicationStorageDirectory"><linktext>applicationStorageDirectory</linktext></link></related-links></apiValue><apiValue id="flash.filesystem:File:applicationStorageDirectory:get"><apiName>applicationStorageDirectory</apiName><shortdesc>
     The application's private storage directory.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiStatic/><apiValueAccess value="read"/><apiValueClassifier>flash.filesystem:File</apiValueClassifier></apiValueDef><apiDesc>
     The application's private storage directory. 
	 
	 <p>Each AIR application has a unique, persistent application storage directory, which
	 is created when you first access <codeph>File.applicationStorageDirectory</codeph>. This directory 
	 is a convenient location to store application-specific data.</p>
	 
	 <p>When you uninstall an AIR application, the uninstaller does not delete files that are stored 
	 in the application storage directory.</p>
	 
	 <p>The <codeph>url</codeph> property for this object uses the <codeph>app-storage</codeph> URL scheme 
	 (not the <codeph>file</codeph> URL scheme). This means that the <codeph>url</codeph> string is specified starting 
	 with <codeph>"app-storage:"</codeph> (not <codeph>"file:"</codeph>). Also, if you create a File object relative to the 
	 <codeph>File.applicationStoreDirectory</codeph> directory (by using the <codeph>resolvePath()</codeph> method), 
	 the <codeph>url</codeph> of the File object also uses the <codeph>app-storage</codeph> URL scheme 
	 (as in the example).</p>
	 
	 <p>The <codeph>applicationStorageDirectory</codeph> property provides a way to reference the 
	 application storage directory that works across platforms. If you set a File object to reference 
	 the application storage directory using the <codeph>nativePath</codeph> or <codeph>url</codeph> property,
	 it will only work on the platform for which that path is valid.</p>
	 
	 </apiDesc><example conref="examples\File.applicationStorageDirectory.1.as"> The following code creates a File object pointing to the "images" subdirectory of 
 the application storage directory.
<codeblock>
import flash.filesystem.File;

var tempFiles:File = File.applicationStorageDirectory;
tempFiles = tempFiles.resolvePath("images/");
trace(tempFiles.url); // app-storage:/images
</codeblock></example></apiValueDetail></apiValue><apiValue id="flash.filesystem:File:desktopDirectory:get"><apiName>desktopDirectory</apiName><shortdesc>
	 The user's desktop directory.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiStatic/><apiValueAccess value="read"/><apiValueClassifier>flash.filesystem:File</apiValueClassifier></apiValueDef><apiDesc>
	 The user's desktop directory.
	 
	 <p>The <codeph>desktopDirectory</codeph> property provides a way to reference the desktop
	 directory that works across platforms. If you set a File object to reference 
	 the desktop directory using the <codeph>nativePath</codeph> or <codeph>url</codeph> property,
	 it will only work on the platform for which that path is valid.</p>
	 
	 </apiDesc><example conref="examples\File.desktopDirectory.1.as"> The following code outputs a list of files and directories contained in the user's desktop directory.
<codeblock>
import flash.filesystem.File;
var desktop:File = File.desktopDirectory;

var files:Array = desktop.getDirectoryListing();

for (var i:uint = 0; i &lt; files.length; i++) {
    trace(files[i].nativePath);
}
</codeblock><swfblock conref="examples\File.desktopDirectory.1.swf"/></example></apiValueDetail></apiValue><apiValue id="flash.filesystem:File:documentsDirectory:get"><apiName>documentsDirectory</apiName><shortdesc>
	 The user's documents directory.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiStatic/><apiValueAccess value="read"/><apiValueClassifier>flash.filesystem:File</apiValueClassifier></apiValueDef><apiDesc>
	 The user's documents directory.
	 
	 <p>On Windows, this is the My Documents directory (for example, C:\Documents and Settings\userName\My Documents). 
	 On Mac OS, the default location is /Users/userName/Documents. On Linux, the default location is /home/userName/Documents
	 (on an English system), and the property observes the <codeph>xdg-user-dirs</codeph> setting.</p>
	 
	 <p>The <codeph>documentsDirectory</codeph> property provides a way to reference the documents
	 directory that works across platforms. If you set a File object to reference 
	 the documents directory using the <codeph>nativePath</codeph> or <codeph>url</codeph> property,
	 it will only work on the platform for which that path is valid.</p>
	 
	 </apiDesc><example conref="examples\File.documentsDirectory.1.as"> The following code uses the <codeph>File.documentsDirectory</codeph> property and the 
 <codeph>File.createDirectory()</codeph> method to ensure that a directory named "AIR Test" exists
 in the user's documents directory.
<codeblock>
import flash.filesystem.File;

var directory:File = File.documentsDirectory;
directory = directory.resolvePath("AIR Test");

File.createDirectory(directory);
trace(directory.exists); // true
</codeblock></example></apiValueDetail></apiValue><apiValue id="flash.filesystem:File:exists:get"><apiName>exists</apiName><shortdesc>
     Indicates whether the referenced file or directory exists.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="read"/><apiValueClassifier>Boolean</apiValueClassifier></apiValueDef><apiDesc>
     Indicates whether the referenced file or directory exists.
     The value is <codeph>true</codeph> if the File object points to an existing file or directory, 
     <codeph>false</codeph> otherwise.
	 
	 </apiDesc><example conref="examples\File.exists.1.as"> The following code creates a temporary file, then deletes it and uses the 
 <codeph>File.exists</codeph> property to check for the existence of the file.
<codeblock>
import flash.filesystem.*;

var temp:File = File.createTempFile();
trace(temp.exists); // true
temp.deleteFile();
trace(temp.exists); // false
</codeblock><swfblock conref="examples\File.exists.1.swf"/></example></apiValueDetail></apiValue><apiValue id="flash.filesystem:File:icon:get"><apiName>icon</apiName><shortdesc>
	 An Icon object containing the icons defined for the file.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="read"/><apiValueClassifier>flash.desktop:Icon</apiValueClassifier></apiValueDef><apiDesc>
	 An Icon object containing the icons defined for the file. An Icon object is an array of BitmapData
	 objects corresponding to the various icon states. On Linux, the Icon object contains no icons.
	 
	 </apiDesc><example conref="examples\File.icon.1.as"> The following code shows how to find the image in the <codeph>icon</codeph> array that has
 the greatest height, and it sets a Bitmap object to that image.
<codeblock>
import flash.filesystem.File;
import flash.display.*;

var directory:File = File.documentsDirectory;
var bitmaps:Array = directory.icon.bitmaps;
var bmpData:BitmapData = new BitmapData(1, 1);
for (var i:uint = 0; i &lt; bitmaps.length; i++) {
    if (bitmaps[i].height &gt; bmpData.height) {
        bmpData = directory.icon.bitmaps[i];
    }
}
var iconBmp:Bitmap = new Bitmap(bmpData);
</codeblock> You might add this Bitmap object as a child of a display object container, 
 such as a Sprite object or a Flex UIComponent object.
</example></apiValueDetail></apiValue><apiValue id="flash.filesystem:File:isDirectory:get"><apiName>isDirectory</apiName><shortdesc>
     Indicates whether the reference is to a directory.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="read"/><apiValueClassifier>Boolean</apiValueClassifier></apiValueDef><apiDesc>
     Indicates whether the reference is to a directory.
     The value is <codeph>true</codeph> if the File object points to a directory; <codeph>false</codeph> otherwise.
	 
	 </apiDesc><example conref="examples\File.isDirectory.1.as"> The following code creates an array of File objects pointing to files and directories in the 
 user directory and then uses the <codeph>isDirectory</codeph> property to list only those File objects that point to 
 directories (not to files).
<codeblock>
import flash.filesystem.*;

var userDirFiles:Array = File.userDirectory.getDirectoryListing();
for (var i:uint = 0; i &lt; userDirFiles.length; i++) {
    if (userDirFiles[i].isDirectory) {
        trace(userDirFiles[i].nativePath);
    }
}    
</codeblock><swfblock conref="examples\File.isDirectory.1.swf"/></example></apiValueDetail></apiValue><apiValue id="flash.filesystem:File:isHidden:get"><apiName>isHidden</apiName><shortdesc>
     Indicates whether the referenced file or directory is "hidden." 
     The value is true if the referenced file or directory is hidden, false otherwise.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><internal>(Waiting for Stan's OK:)
	 
	 <ul>
	 
	 	<li>On Windows, a file or directory is designated as hidden by specifying the 
	 Hidden attribute (for example, in the File Properties dialog box) for the file.</li>
	 
	 	<li>On Mac OS and Linux, files can be designated as hidden for a number of reasons. Files with 
	 names that begin with the dot (.) character are designated as hidden. A .hidden file 
	 in the root directory lists other hidden files. Also, there is a bit in the file that, 
	 when set, makes it hidden.</li>
	 
	 </ul>
	 
	 </internal></asCustoms></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="read"/><apiValueClassifier>Boolean</apiValueClassifier></apiValueDef><apiDesc>
     Indicates whether the referenced file or directory is "hidden." 
     The value is <codeph>true</codeph> if the referenced file or directory is hidden, <codeph>false</codeph> otherwise.
	 
	 </apiDesc><example conref="examples\File.isHidden.1.as"> The following code creates an array of File objects pointing to files and directories in the 
 user directory and then uses the <codeph>isHidden</codeph> property to list hidden files and directories.
<codeblock>
import flash.filesystem.*;

var userDirFiles:Array = File.userDirectory.getDirectoryListing();
for (var i:uint = 0; i &lt; userDirFiles.length; i++) {
    if (userDirFiles[i].isHidden) {
        trace(userDirFiles[i].nativePath);
    }
}    
</codeblock><swfblock conref="examples\File.isHidden.1.swf"/></example></apiValueDetail></apiValue><apiValue id="flash.filesystem:File:isPackage:get"><apiName>isPackage</apiName><shortdesc>
     Indicates whether the referenced directory is a package.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="read"/><apiValueClassifier>Boolean</apiValueClassifier></apiValueDef><apiDesc>
     Indicates whether the referenced directory is a package.
     
	 <p>The value is <codeph>true</codeph> if the referenced directory is a package, <codeph>false</codeph> otherwise.
	 Note that the File class does not allow creating packages directly.</p>
	 
	 <ul>
	 
	 	<li>On Mac OS, directories can be designated as packages and will show up in the Finder as a
	  single file rather than as a directory. This property is set to <codeph>true</codeph> if the referenced 
	  directory is a package, and <codeph>false</codeph> if the file is not a directory, does not exist, or 
	 is not a package.</li>
	 
	 	<li>On other operating systems, this property is always set to <codeph>false</codeph>.</li>
	 
	 </ul>
	 
	 </apiDesc></apiValueDetail></apiValue><apiValue id="flash.filesystem:File:isSymbolicLink:get"><apiName>isSymbolicLink</apiName><shortdesc>
     Indicates whether the reference is a symbolic link.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="read"/><apiValueClassifier>Boolean</apiValueClassifier></apiValueDef><apiDesc>
     Indicates whether the reference is a symbolic link.
     
	 <p>The value is <codeph>true</codeph> if the File object is a symbolic link, <codeph>false</codeph> otherwise.
	 Note that the File class does not allow creating symbolic links directly.</p>
	 
	 <p>Symbolic links allow a file to point to another file or directory on disk. Although similar, symbolic
	 links are not the same as aliases on Mac OS and shortcuts on Windows. An alias or a  shortcut is always
	 reported as a file (rather than a directory), and reading or writing to an alias or shortcut
	 never affects the original file or directory that it points to.
	 On the other hand, a symbolic link generally behaves like the file or directory it points to. It can be
	 reported as a file or a directory, and reading or writing to a symbolic link affects the file or directory
	 that it points to, not the symbolic link itself. Deleting a symbolic link, however, deletes the link 
	 and not the target of the link.</p>
	 
	 <p>Mac<sup>®</sup> OS<sup>®</sup>, Linux, and Windows<sup>®</sup> Vista<sup>®</sup>
	 support symbolic links. Additionally, on Windows the <codeph>isSymbolicLink</codeph> 
	 property for a File object referencing a junction point (used in the NTFS file system) is set to
	 <codeph>true</codeph>.</p>
	 
	 </apiDesc></apiValueDetail></apiValue><apiValue id="flash.filesystem:File:lineEnding:get"><apiName>lineEnding</apiName><shortdesc>
	 The line-ending character sequence used by the host operating system.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiStatic/><apiValueAccess value="read"/><apiValueClassifier>String</apiValueClassifier></apiValueDef><apiDesc>
	 The line-ending character sequence used by the host operating system.
	 
	 <p>On Mac OS and Linux, this is the line-feed character (character code 0x0A hexadecimal). 
	 On Windows, this is the carriage return character (character code 0x0D hexadecimal) followed
	 by the line-feed character (character code 0x0A hexadecimal).</p>
	 
	 </apiDesc><example conref="examples\File.lineEnding.1.as"> The following code writes a string (<codeph>str</codeph>) to a text file and uses the 
 <codeph>File.lineEnding</codeph> static property to replace all instances of the new-line character 
 (represented in the code by the regular expression <codeph>/\n/g</codeph>) with the preferred  
 line-ending character for the host operating system.
<codeblock>
import flash.filesystem.*;

var str:String = "Hello\n" + 
        "World\n";
str = str.replace(/\n/g, File.lineEnding);
var file:File = File.documentsDirectory.resolvePath("AIR Test/test.txt");
var fileStream:FileStream = new FileStream();
fileStream.open(file, FileMode.WRITE);
fileStream.writeUTF(str);
fileStream.close();
</codeblock></example></apiValueDetail></apiValue><apiValue id="flash.filesystem:File:nativePath:get"><apiName>nativePath</apiName><shortdesc>
	 The full path in the host operating system representation.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="readwrite"/><apiValueClassifier>String</apiValueClassifier><apiException><apiDesc>The caller is not in the application security sandbox.
	 
	 </apiDesc><apiItemName>SecurityError</apiItemName><apiOperationClassifier>SecurityError</apiOperationClassifier></apiException><apiException><apiDesc>The syntax of the path is invalid.
	 
	 </apiDesc><apiItemName>ArgumentError</apiItemName><apiOperationClassifier>ArgumentError</apiOperationClassifier></apiException></apiValueDef><apiDesc>
	 The full path in the host operating system representation. On Mac OS and Linux, 
	 the forward slash (/) character is used as the path separator. 
	 However, in Windows, you can <i>set</i> the <codeph>nativePath</codeph> property 
	 by using the forward slash character or the backslash (\) character as the 
     path separator, and AIR automatically replaces forward slashes with 
	 the appropriate backslash character.
	 
	<p>Before writing code to <i>set</i> the <codeph>nativePath</codeph> property directly, 
	consider whether doing so may result in platform-specific code. For example, a native 
	path such as <codeph>"C:\\Documents and Settings\\bob\\Desktop"</codeph> is only valid on Windows.
	It is far better to use the following static properties, which represent commonly used directories,
	and which are valid on all platforms:</p>
	
	<ul>
	<li><codeph>File.applicationDirectory</codeph></li>
	<li><codeph>File.applicationStorageDirectory</codeph></li>
	<li><codeph>File.desktopDirectory</codeph></li>
	<li><codeph>File.documentsDirectory</codeph></li>
	<li><codeph>File.userDirectory</codeph></li>
	</ul>
	
	<p>You can use the <codeph>resolvePath()</codeph> method to get a path relative to these directories.</p>
	
	<p product="flex">Some Flex APIs, such as the <codeph>source</codeph> property of the SWFLoader class, use a 
	URL (the <codeph>url</codeph> property of a File object), not a native path (the <codeph>nativePath</codeph>
	property).</p>
	
	<p platform="javascript">Some APIs, such as the <codeph>src</codeph> property of an IMG object, use a 
	URL (the <codeph>url</codeph> property of a File object), not a native path (the <codeph>nativePath</codeph>
	property).</p>
	
	 </apiDesc><example conref="examples\File.nativePath.1.as"> The following code shows the difference between the <codeph>nativePath</codeph>
 property and the <codeph>url</codeph> property of a File object. The comments show results on an
 example Windows computer.
<codeblock>
import flash.filesystem.File;

var docs:File = File.documentsDirectory;
trace(docs.nativePath); // C:\Documents and Settings\turing\My Documents
trace(docs.url); // file:///C:/Documents%20and%20Settings/turing/My%20Documents
</codeblock></example></apiValueDetail></apiValue><apiValue id="flash.filesystem:File:parent:get"><apiName>parent</apiName><shortdesc>
     The directory that contains the file or directory referenced by this File object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="read"/><apiValueClassifier>flash.filesystem:File</apiValueClassifier></apiValueDef><apiDesc>
     The directory that contains the file or directory referenced by this File object. 
	 
	 <p>If the file or directory does not exist, the <codeph>parent</codeph> property still returns the
	 File object that points to the containing directory, even if that directory does not exist.</p>
	 
	 <p>This property is identical to the return value for <codeph>resolvePath("..")</codeph> except that the parent of a root
	 directory is <codeph>null</codeph>.</p>
	 
	 </apiDesc><example conref="examples\File.parent.1.as"> The following code uses the <codeph>parent</codeph> property to show the directory
 that contains a temporary file.
<codeblock>
import flash.filesystem.File;

var tempFile:File = File.createTempDirectory();
trace(tempFile.parent.nativePath);
tempFile.deleteFile();
</codeblock></example></apiValueDetail></apiValue><apiValue id="flash.filesystem:File:separator:get"><apiName>separator</apiName><shortdesc>
	 The host operating system's path component separator character.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiStatic/><apiValueAccess value="read"/><apiValueClassifier>String</apiValueClassifier></apiValueDef><apiDesc>
	 The host operating system's path component separator character.
	 
	 <p>On Mac OS and Linux, this is the forward slash (/) character. On Windows, it is the backslash 
	 (\) character.</p>
	 
	 <p><i>Note:</i> When using the backslash character in a String literal, remember to 
	 type the character twice (as in <codeph>"directory\\file.ext"</codeph>). Each pair of backslashes
	 in a String literal represent a single backslash in the String.</p>
	 
	 </apiDesc><example conref="examples\File.separator.1.as"> The following code uses the <codeph>getRelativePath()</codeph> method to get the relative path
 between a directory and a file. The code then uses the <codeph>File.separator</codeph> static property 
 to replace forward slash (/) characters in the path with the separator character used by the operating 
 system, which is the backslash character (\) on Windows and the forward slash character on other
 operating systems.
<codeblock>
import flash.filesystem.File;

var directory:File = File.documentsDirectory.resolvePath("Apollo Test");
var file:File = File.documentsDirectory.resolvePath("Apollo Test/employees/bob/test.txt");

var relativePath:String = directory.getRelativePath(file); // employees/bob/test.txt
relativePath = relativePath.replace(/\//g, File.separator);
trace(relativePath); 
</codeblock> In this example, the <codeph>replace()</codeph> method uses a regular expression, 
 <codeph>/\//g</codeph>, to match <i>all</i> forward slash characters.
</example></apiValueDetail></apiValue><apiValue id="flash.filesystem:File:spaceAvailable:get"><apiName>spaceAvailable</apiName><shortdesc>
	 The space available for use at this File location, in bytes.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.1"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="read"/><apiValueClassifier>Number</apiValueClassifier></apiValueDef><apiDesc>
	 The space available for use at this File location, in bytes. 
	 
	 <p> If the File object references a directory,
	 <codeph>spaceAvailable</codeph> indicates the space in the directory that files can use. If
	 the File object references a file, <codeph>spaceAvailable</codeph> indicates the space into which the file
	 could grow. If the file location does not exist, <codeph>spaceAvailable</codeph> is set to 0. If the File 
	 object references a symbolic link, <codeph>spaceAvailable</codeph> indicates the space available at the  
	 location the symbolic link points to.</p>
	 
	 <p>Typically the space available for a directory or file is the same as the space available on the 
	 volume containing the directory or file. However, space available can take into account quotas and 
	 per-directory limits.</p>
	 
	 <p>Adding a file or directory to a volume generally requires more space than the actual size of the file 
	 or the size of the contents of the directory. For example, the operating system may require more space to 
	 store index information. Or the disk sectors required may use additional space. Also, available
	 space changes dynamically. So, you cannot expect to allocate <i>all</i> of the reported space 
	 for file storage.</p>
	 
	 </apiDesc></apiValueDetail></apiValue><apiValue id="flash.filesystem:File:systemCharset:get"><apiName>systemCharset</apiName><shortdesc>
	 The default encoding used by the host operating system.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiStatic/><apiValueAccess value="read"/><apiValueClassifier>String</apiValueClassifier></apiValueDef><apiDesc>
	 The default encoding used by the host operating system. 
	 
	 <p>Possible values include <codeph>"windows-1252"</codeph>
	 <codeph>"shift-jis"</codeph>, <codeph>"cn-gb"</codeph>, <codeph>"iso-8859-1"</codeph>, and others.
	 For a complete list, see <xref href="../../charset-codes.html">Supported Character Sets</xref>.</p>
	 
	 <p>You can use this value when using the <codeph>readMultiByte()</codeph> and <codeph>writeMultiByte()</codeph>
	 methods of the FileStream class.</p>
	 
	 </apiDesc><example conref="examples\File.systemCharSet.1.as"> The following code opens a file (a test.txt file in the AIR Test subdirectory of the 
 user's documents directory), and uses the <codeph>File.systemCharset</codeph> static property
 as the <codeph>charSet</codeph> parameter of a call to the <codeph>readMultiByte()</codeph> method
 of a FileStream object.
<codeblock>
import flash.filesystem.File;

var file:File = File.documentsDirectory.resolvePath("AIR Test/test.txt");
var fileStream:FileStream = new FileStream();
fileStream.open(file, FileMode.READ);
var str:String = fileStream.readMultiByte(file.size, File.systemCharset);
trace(str);    
</codeblock></example></apiValueDetail><related-links><link href="flash.filesystem.xml#FileStream/readMultiByte()"><linktext>FileStream.readMultiByte()</linktext></link><link href="flash.filesystem.xml#FileStream/writeMultiByte()"><linktext>FileStream.writeMultiByte()</linktext></link></related-links></apiValue><apiValue id="flash.filesystem:File:url:get"><apiName>url</apiName><shortdesc>
	 The URL for this file path.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><internal>The URL will have a null "host" specification. (As opposed to "localhost". This is more confusing than 
	 informative.
	 
	 </internal></asCustoms></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="readwrite"/><apiValueClassifier>String</apiValueClassifier><apiException><apiDesc>The URL syntax is invalid.
	 
	 </apiDesc><apiItemName>ArgumentError</apiItemName><apiOperationClassifier>ArgumentError</apiOperationClassifier></apiException><apiException><apiDesc>The caller is not in the application security sandbox.
	 
	 </apiDesc><apiItemName>SecurityError</apiItemName><apiOperationClassifier>SecurityError</apiOperationClassifier></apiException></apiValueDef><apiDesc>
	 The URL for this file path.
	 
	 <p>If this is a reference to a path in the application storage directory, the URL scheme is 
	 <codeph>"app-storage"</codeph>; if it is a reference to a path in the application directory, the 
	 URL scheme is <codeph>"app"</codeph>; otherwise the scheme is <codeph>"file"</codeph>. </p>
	 
	 <p>You can use blank space characters (rather than <codeph>"%20"</codeph>) when
     <i>assigning</i> a value to the <codeph>url</codeph> property; AIR automatically 
	 encodes the strings (for instance, converting spaces to <codeph>"%20"</codeph>).</p>
	 
	 </apiDesc><example conref="examples\File.nativePath.1.as"> The following code shows the difference between the <codeph>nativePath</codeph>
 property and the <codeph>url</codeph> property of a File object. The comments show results on an
 example Windows computer.
<codeblock>
import flash.filesystem.File;

var docs:File = File.documentsDirectory;
trace(docs.nativePath); // C:\Documents and Settings\turing\My Documents
trace(docs.url); // file:///C:/Documents%20and%20Settings/turing/My%20Documents
</codeblock></example></apiValueDetail><related-links><link href="flash.filesystem.xml#File/nativePath"><linktext>nativePath</linktext></link><link href="../../package.html#decodeURI()"><linktext>decodeURI() global function</linktext></link><link href="../../package.html#decodeURIComponent()"><linktext>decodeURIComponent() global function</linktext></link><link href="../../package.html#encodeURI()"><linktext>decodeURI() global function</linktext></link><link href="../../package.html#encodeURIComponent()"><linktext>decodeURIComponent() global function</linktext></link></related-links></apiValue><apiValue id="flash.filesystem:File:userDirectory:get"><apiName>userDirectory</apiName><shortdesc>
	 The user's directory.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiStatic/><apiValueAccess value="read"/><apiValueClassifier>flash.filesystem:File</apiValueClassifier></apiValueDef><apiDesc>
	 The user's directory.
	 
	 <p>On Windows, this is the parent of the My Documents directory
	 (for example, C:\Documents and Settings\userName). On
	 Mac OS, it is /Users/userName. On Linux, it is /home/userName.</p>
	 
	 <p>The <codeph>userDirectory</codeph> property provides a way to reference the user
	 directory that works across platforms. If you set the <codeph>nativePath</codeph> or <codeph>url</codeph>
	 property of a File object directly, it will only work on the platform for which that path is valid.</p>
	 
	 </apiDesc><example conref="examples\File.userDirectory.1.as"> The following code outputs a list of files and directories contained in the root level 
 of the user directory:
<codeblock>
import flash.filesystem.File;

var files:Array = File.userDirectory.listDirectory();
for (var i:uint = 0; i &lt; files.length; i++) {
    trace(files[i].nativePath);
}
</codeblock></example></apiValueDetail></apiValue></apiClassifier></apiPackage>