kirby/vendor/getkirby/toolkit/lib/folder.php
/**
   * Returns a collection with full File and Directory objects
   * for each item in the directory
   * 
   * @param array $ignore
   * @return Collection
   */
Returns a collection with full File and Directory objects
for each item in the directory

@param array $ignore
@return Collection
Returns a collection with full File and Directory objects for each item in the directory @param array $ignore @return Collection
public function content($ignore = null) {
    $raw     = $this->scan($ignore);
    $root    = $this->root;
    $content = new Collection();
    foreach($raw as $file) {
      if(is_dir($root . DS . $file)) {
        $content->append($file, new static($root . DS . $file));
      } else {
        $content->append($file, new Media($root . DS . $file));
      }
    }
    return $content;
  }
public function content ( $ ignore = null ) { $ raw = $ this -> scan ( $ ignore ) ; $ root = $ this -> root ; $ content = new Collection ( ) ; foreach ( $ raw as $ file ) { if ( is_dir ( $ root . DS . $ file ) ) { $ content -> append ( $ file , new static ( $ root . DS . $ file ) ) ; } else { $ content -> append ( $ file , new Media ( $ root . DS . $ file ) ) ; } } return $ content ; }
Returns a collection with full File and Directory objects
 for each item in the directory
Returns a collection with full File and Directory objects for each item in the directory