开发者

How can I make Air remember the location of last opened file?

开发者 https://www.devze.com 2023-02-12 17:05 出处:网络
All the walkthroughs I\'ve seen specify either desktop, local files as the initial view when calling browseForOpen.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消