Hi,I am looking for a Method/Way to know whether a input path of FilesSystem contains any Child file/folder or not.
To know it currently I am using "Directory.GetFileSystemEntries(Path).Count" and checking if count > 0 then returning True else False. For this first method calculates all the files and folder and then return status to me but I want to exit out as soon as my method gets first element(file/folder) in specified path.
Because above method is timing out when my input path contains more than 1 million files.
I just need to check whether input folder path contains any child file/folder or not.
I have tried to use Win32 API also but on ther server it is crashing so I donot want to use that solution.
In .NET any method or way is present to know it.
Please suggest me.
View Complete Post