开发者

How can i find a file in system from flex

I am loading data from one sample.xml file using http service. the xml file will generated by jsp and it is saving in one proper location like(d:/programfiles/some.xml).now when I first time login to application i need to check whether that xml file is present or not. How can I chec开发者_运维问答k? Please help me in this it will very help full for me.


If it's a web flex app, you can't do it.

However, if you are using AIR, use the File class


var file:File = File.documentsDirectory.resolvePath("some\\where\\file.xml");
if( file.exists) Alert.show( "Found");

You can also use

File.applicationStorageDirectory
File.applicationDirectory
File.desktopDirectory
File.documentsDirectory
File.userDirectory
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜