java - unable to validate directory loaded from property file -


i trying load directory properties file. have following defined in property file:

image.src.dir = "c:\\temp\\foo\\" 

yes, directory name ... mixed case. have tried referring directory "/temp/foo" same outcome.

i have following code fails despite directory existing.

string srcdir = prop.getproperty("image.src.dir");  file folder = new file(srcdir); if (!folder.isdirectory()) { system.err.println("directory: " + srcdir + " doesn't exist"); } 

thanks hint ...

the problem & solution:

solution: image.src.dir=c:\\temp\\foo\\

problem: image.src.dir = "c:\\temp\\foo\\"

that problem ..!

did try system.println(srcdir) if string gets loaded properties file? directory accessible (are rights superdirectories correct?).


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -