c# - Why does System.IO.File.Exists(string path) return false? -


system.io.file.exists(string path) 

returns false, when file exists on specified path. possible solution?

it permission problem. documentation:

the exists method returns false if error occurs while trying determine if specified file exists. can occur in situations raise exceptions such passing file name invalid characters or many characters, failing or missing disk, or if caller not have permission read file.

one way of seeing what's happening try read file (e.g. file.openread). i'd surprised if succeeds - if fails, exception should give more information.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -