FileExists Timeout

Possible Duplicate:
Faster DirectoryExists Function?

I want to check if any file exists on a network drive. But FileExists is too slow if the drive is disconnected. How can I check it with some timeout?

Examples are welcome.

0
source share
3 answers

Departure

Faster DirectoryExists Function?

I asked the same question. The bottom line is that, unfortunately, you cannot avoid these long timeouts if the file does not exist.

+4
source

, , FileExists , FileExists -, .

+2

, FileExists CreateFile ( NtCreateFile), CreateFile .

- , , , , . DFS, .

, , , despart, FileExists . , - TerminateThread - API.

+2
source

Source: https://habr.com/ru/post/1725702/


All Articles