Пример #1
0
 private IEnumerable <ExFatEntryInformation> GetEntries(ExFatEntryInformation entryInformation, int depth)
 {
     if (depth == 0 || !entryInformation.Attributes.HasAny(FileAttributes.Directory))
     {
         return(_noEntry);
     }
     return(_filesystem.EnumerateEntries(entryInformation.Path).SelectMany(e => new[] { e }.Concat(GetEntries(e, depth - 1))));
 }
Пример #2
0
        private bool IsMatch(Regex regex, ExFatEntryInformation e)
        {
            if (regex == null)
            {
                return(true);
            }
            var fileName = GetFileName(e.Path);

            return(regex.IsMatch(fileName));
        }