Exemplo n.º 1
0
        public virtual string GetLatestDirectoryFromPattern(string path, string pattern)
        {
            var directories = from directory in _directoryProvider.GetSubDirectories(path)
                              select new
            {
                Directory = directory,
                Date      = GetDirectoryDateTimeFromPattern(directory, pattern)
            };

            return(directories.OrderByDescending(d => d.Date)
                   .FirstOrDefault()?.Directory);
        }