Checking if folder has files
- by phenevo
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 ?