Checking if folder has files

前端 未结 6 1137
清歌不尽
清歌不尽 2021-02-10 09:58

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=         


        
6条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-10 10:37

    Your best bet is to use the API function FindFirstFile. It wont take nearly as long then.

提交回复
热议问题