How can I make Air remember the location of last opened file?
All the walkthroughs I've seen specify either desktop, local files as the initial view when calling browseForOpen.
Is there a way to have the air开发者_开发技巧 application remember the last location a file was loaded from and default back there?
If necessary I suppose the path could be written to the local db, but even still, I do not know how to get the filepath of the loaded file.
You can use File.nativePath and File.resolvePath.
A few years later, perhaps, but thought this might help someone in the future.
var file:File = new File();
file.browseForOpen("Open");
This will open the last location.
精彩评论