Skip to content

Instantly share code, notes, and snippets.

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