public override IEnumerable <Entry> GetFiles(string pattern) { string path = Path.GetDirectoryName(pattern); pattern = Path.GetFileName(pattern); path = CombinePath(CurrentDirectory, path); if (!string.IsNullOrEmpty(path)) { path += PathDelimiter; } var glob = new FileNameGlob(pattern); return(from file in m_arc.Dir where file.Name.StartsWith(path) && glob.IsMatch(Path.GetFileName(file.Name)) select file); }
public override IEnumerable <Entry> GetFiles(string pattern) { string path = GetDirectoryName(pattern); if (string.IsNullOrEmpty(path)) { path = CurrentDirectory; } pattern = Path.GetFileName(pattern); var glob = new FileNameGlob(pattern); if (string.IsNullOrEmpty(path)) { return(m_arc.Dir.Where(f => glob.IsMatch(Path.GetFileName(f.Name)))); } else { path += PathDelimiter; return(m_arc.Dir.Where(f => f.Name.StartsWith(path) && glob.IsMatch(Path.GetFileName(f.Name)))); } }
public override IEnumerable <Entry> GetFiles(string pattern) { var glob = new FileNameGlob(pattern); return(m_arc.Dir.Where(f => glob.IsMatch(f.Name))); }
public override IEnumerable<Entry> GetFiles(string pattern) { string path = GetDirectoryName (pattern); if (string.IsNullOrEmpty (path)) path = CurrentDirectory; pattern = Path.GetFileName (pattern); var glob = new FileNameGlob (pattern); if (string.IsNullOrEmpty (path)) { return m_arc.Dir.Where (f => glob.IsMatch (Path.GetFileName (f.Name))); } else { path += PathDelimiter; return m_arc.Dir.Where (f => f.Name.StartsWith (path) && glob.IsMatch (Path.GetFileName (f.Name))); } }
public override IEnumerable<Entry> GetFiles(string pattern) { var glob = new FileNameGlob (pattern); return m_arc.Dir.Where (f => glob.IsMatch (f.Name)); }