You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
EmptyDirectoryConstraint doesn't need to enumerate entire directory contents #3622
EmptyDirectoryConstraint currently tries to read in and instantiate all content in a directory in order to determine if the directory is empty or not empty.
An alternative could be to use one call to EnumerateFileSystemInfos().Any() to detect existence of either files or subdirectories without instantiating a whole array of them. Unfortunately, this API isn't available in .NET 35, so some sort of fallback would be required to go this route. A fallback could be either the currently implementation, or using GetFileSystemInfos().Any(). Example:
Activity