Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
IEnumerable <FolderInfo> latestFolders = directoryInfo.GetDirectories()
.Where(x => Directory.GetFiles(x.FullName, "*", SearchOption.AllDirectories).Count() == 0)
.Select(x => new FolderInfo()
Name = x.Name,
CreatedOn = x.CreationTime
.CatchExceptions(x => Logger.LogError(string.Format("Error while retrieving files in FTP folders"), x));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment