I use
DirectoryExists (const PathName : String);
to check if a directory is reachable from a computer or not. But if the directory does not exist and the path name is a network path, i.e.
\computer1Data
the method takes a very long time to return.
There must be a faster way to determine that a network folder is not reachable. Or can I configure some timeout parameter that DirectoryExists uses internally (I looked at the source code but it just delegates to GetFileAttributes which is defined in kernel32)?
Any ideas?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…