I’m interested in using Flash or Flex to create a File Explorer/Tree which the user can point to a directory on their hard drive, and keep open while they do other things. Similar to TextMate’s project drawer, or the file trees on many code editors.
Is it possible to create a local file browser using these technologies, and are you aware of any examples or tutorials using file-structure access, if so?
Please note that this is for a web application, and the file explorer needs to be in the web page. Having a user install an AIR application is not an option.
This can’t be done in a SWF within the browser. The only thing you can do for filesystem stuff within the browser is use FileReference, which simply opens the system default open/save dialog and tells you what file the user selected. All other filesystem functionality is restricted to only AIR applications.
The one option is that a web page can trigger the launch of an AIR application. That could run minimized/hidden and do the filesystem stuff and use LocalConnection to communicate back with a SWF within the browser. This would still require the user to install an AIR app though. It also has some security implications and you’d have to be fairly careful with it to make sure you don’t accidentally expose filesystem access to SWFs other than your own (else someone else could exploit it).
I wouldn’t recommend that, but it’s the only thing I can think of that would allow you to do this within a SWF. Flash/Flex simply isn’t the right technology to use for some things due to its security (and other) restrictions.