/**
  * Retrieve files from filesystem
  *
  * @param   string cwd
  * @return  string[]
  */
 public function addAll($cwd)
 {
     $list = array();
     $qs = preg_quote(DIRECTORY_SEPARATOR);
     foreach ($this->getArguments() as $arg) {
         if (false !== ($p = strrpos($arg, '='))) {
             $urn = substr($arg, $p + 1);
             $arg = substr($arg, 0, $p);
         } else {
             $urn = null;
         }
         if (is_file($arg)) {
             $this->add(realpath($arg), $cwd, $urn);
             continue;
         }
         // Recursively retrieve all files from directory, ignoring well-known
         // VCS control files.
         if (is_dir($arg)) {
             $collection = new FileCollection($arg);
             $iterator = new FilteredIOCollectionIterator($collection, new AllOfFilter(array(new NegationOfFilter(new UriMatchesFilter('#' . $qs . '(CVS|\\.svn|\\.git|\\.arch|\\.hg|_darcs|\\.bzr)' . $qs . '#')), new NegationOfFilter(new CollectionFilter()))), true);
             while ($iterator->hasNext()) {
                 $this->add($iterator->next()->getURI(), $cwd);
             }
             continue;
         }
     }
     return $list;
 }
 /**
  * Helper method
  *
  * @param   io.collections.iterate.Filter $filter
  * @param   bool $recursive default FALSE
  * @return  string[] an array of the elements' URIs
  */
 protected function filterFixtureWith($filter, $recursive = false)
 {
     $elements = [];
     for ($it = new FilteredIOCollectionIterator($this->fixture, $filter, $recursive); $it->hasNext();) {
         $elements[] = $it->next()->getURI();
     }
     return $elements;
 }