Folder empty

  • Thread starter Thread starter Luigi Z
  • Start date Start date
L

Luigi Z

Hi all,
using C# 2.0, how can I see if a folder is empty? (i.e. without any file
inside it).

Thanks in advance.
 
Paul said:
Use Directory.GetFiles to retrieve an array of filenames, and check whether
the Length is zero.

It may be a good idea to consider whether the presence of sub
directories would make it "non empty".

Arne
 
Back
Top