tags:

views:

23

answers:

2

Hi, 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 check? Please help me in this it will very help full for me.

+1  A: 

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

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

Frank
+1  A: 
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
Thanks for your answer,i am unable to import File class in my IDE(Flex3.0).when i am importing File class only 3 types of classes it is showing "FileFilter","FileReference","FileReferenceList". is there anything external class i need to add?
praveen
Ok I got it only this is for Air appliaction right?
praveen
Absolutely right