Checking if folder has files

Posted by phenevo on Stack Overflow See other posts from Stack Overflow or by phenevo
Published on 2010-04-26T10:51:52Z Indexed on 2010/04/26 10:53 UTC
Read the original article Hit count: 153

Filed under:
|

Hi,

I have program which writes to database which folders are full or empty. Now I'm using

bool hasFiles=false; (Directory.GetFiles(path).Length >0) ? hasFiles=true: hasFiles=false;

but it takes almost one hour, and I can't do anything in this time.

Is there any fastest way to check if folder has any file ?

© Stack Overflow or respective owner

Related posts about c#

Related posts about directory