开发者

how to get full qualified path of uploading file in flex3 and actionscript 3

开发者 https://www.devze.com 2023-03-09 10:37 出处:网络
say, user created a xml file by an AIR application and this file has been saved in certain location of his machine. If user enters second time in that application, the content of that XML file, should

say, user created a xml file by an AIR application and this file has been saved in certain location of his machine. If user enters second time in that application, the content of that XML file, should be displayed without prompting him. application should read file silently and display the content.

In this scenario, i thought that when user will save that file, the entire file location will be saved in cookie. If user enters second time in that application, the file path will be available from cookie. user will not be prompted.

This is the following code segment:

var _refFile:FileReference = new FileReference();
var newXMLStr:String = "this is a problem"; 
_refFile.save(newXMLStr,"abc.xml");

How can I get that full qualified path of saved file ?

is it possible to implement? if so, please please help me out. I stuck to this problem for long days. If it is not possible then please provide any a开发者_C百科lternative suitable solutions.


Instead of using FileReference, use File:

var file:File = new File();
file.save(xml, 'abc.xml');
trace(file.nativePath);
0

精彩评论

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