.net - System.IO.Directory.Exists is giving an intermittent false negative -


i’m getting intermittent false negative on following line of code in asp.net 2 web site:

if (!system.io.directory.exists(folder)) 

the folder exists, , contains log file written when clr doesn’t lie folder’s existence. appreciated.

exists() returns false, rather throwing error, if sort of io error occurs. 1 thing watch out security errors. exists not perform network authentication, requires being pre-authenticated if accessing network share, @ least according docs. haven't tried myself.


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -