Click here to Skip to main content
15,886,788 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,

I am providing a path name to a file in wxURL like wxURL url("http://a.host/a.dir/a.file");

But I am not able to catch the one error when the file mentioned in the path is not present using wxURLError GetError().

How to check whether the file is present or not and then continue with streaming..?

thanks,
sooraj
Posted

Check this out to check if the file is exist on HTTP server..!

How to check if a file exists over HTTP
 
Share this answer
 
Try like this, I have tried it in my application...

C#
string filePath = Request.PhysicalApplicationPath + "HP2133.jpg";  
  
        FileInfo imageFile = new FileInfo(filePath);  
        bool fileExists = imageFile.Exists;  
        Label1.Text = "File exits?: " + fileExists.ToString();  
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900