Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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))));
            }
        }
Exemplo n.º 3
0
        public override IEnumerable <Entry> GetFiles(string pattern)
        {
            var glob = new FileNameGlob(pattern);

            return(m_arc.Dir.Where(f => glob.IsMatch(f.Name)));
        }
Exemplo n.º 4
0
 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)));
     }
 }
Exemplo n.º 5
0
 public override IEnumerable<Entry> GetFiles(string pattern)
 {
     var glob = new FileNameGlob (pattern);
     return m_arc.Dir.Where (f => glob.IsMatch (f.Name));
 }