The following example shows how you can set the initial directory for the Adobe AIR FileSystemTree control by setting the directory property to a File object, which in this case is the user’s document’s directory.

Full code after the jump.


Tagged with:

2 Responses to Setting the root directory on a FileSystemTree control in Adobe AIR

  1. zmart says:

    Hi Peter,

    I am trying to set the custom directory, let’s say “C:\Work”.
    Still trying :(
    I was wondering if you give me some advice how to do that.

    Code below doesn’t work properly

    [Bindable] private var workDir:File;
    workDir = File("C:\Work"); 
  2. zmart says:

    The solution is found:

    workDir = new File("file:///C:/Work");  // was workDir = File("C:/Work");

Leave a Reply

Your email address will not be published.