src/Filesystem.php
public function find($pattern)
    {
        if (! $this->adapter->isAbsolute($pattern)) {
            $pattern = $this->rootPath . $pattern;
        }
        $list = new Collection;
        foreach ($this->adapter->glob($pattern) as $path) {
            if ($this->isFile($path, true)) {
                $list->add(new File($path, $this->adapter));
            } else {
                $list->add(new Directory($path, $this->adapter));
            }
        }
        return $list;
    }
public function find($pattern)
    {
        if (! $this->adapter->isAbsolute($pattern)) {
            $pattern = $this->rootPath . $pattern;
        }
        $list = new Collection;
        foreach ($this->adapter->glob($pattern) as $path) {
            if ($this->isFile($path, true)) {
                $list->add(new File($path, $this->adapter));
            } else {
                $list->add(new Directory($path, $this->adapter));
            }
        }
        return $list;
    }
public function find ( $ pattern ) { if ( ! $ this -> adapter -> isAbsolute ( $ pattern ) ) { $ pattern = $ this -> rootPath . $ pattern ; } $ list = new Collection ; foreach ( $ this -> adapter -> glob ( $ pattern ) as $ path ) { if ( $ this -> isFile ( $ path , true ) ) { $ list -> add ( new File ( $ path , $ this -> adapter ) ) ; } else { $ list -> add ( new Directory ( $ path , $ this -> adapter ) ) ; } } return $ list ; }
Finds files and directories matching the given pattern
and returns a collection containing them.

@param  string  $pattern
@return Tarsana\Filesystem\Collection
Finds files and directories matching the given pattern and returns a collection containing them .