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)))); }
private bool IsMatch(Regex regex, ExFatEntryInformation e) { if (regex == null) { return(true); } var fileName = GetFileName(e.Path); return(regex.IsMatch(fileName)); }