Adobe Flex 3 Help

Example: Displaying a directory structure with Flex AIR

The following example uses the WindowedApplication container and the FileSystemTree and FileSystemDataGrid controls. In this example, the FileSystemTree control displays a directory structure. Clicking a directory name in the FileSystemTree control causes the FileSystemDataGrid control to display information about the files in the selected directory:

    <?xml version="1.0" encoding="utf-8"?>
    <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml">
        <mx:HDividedBox>
        <mx:FileSystemTree id="tree" 
            width="200" height="100%"
            directory="{new File('C:\\')}"
            enumerationMode="directoriesOnly"
            change="dataGrid.directory = File(tree.selectedItem);"/>    
        <mx:FileSystemDataGrid id="dataGrid" 
            width="100%" height="100%"
            directory="{new File('C:\\')}"/>
        </mx:HDividedBox>
    </mx:WindowedApplication>