Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hbulens/613af1a70d18f277bd1e14809c822b59 to your computer and use it in GitHub Desktop.
Save hbulens/613af1a70d18f277bd1e14809c822b59 to your computer and use it in GitHub Desktop.
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