kirby/vendor/getkirby/toolkit/lib/folder.php
/**
   * Recursively check when the dir and all 
   * subfolders have been modified for the last time. 
   * 
   * @return  int  
   */
Recursively check when the dir and all
subfolders have been modified for the last time.

@return  int
Recursively check when the dir and all subfolders have been modified for the last time . @return int
public function modified($format = null, $handler = 'date') {
    $modified = filemtime($this->root); 
    $items    = $this->scan(array('.', '..'));
    foreach($items AS $item) {      
      if(is_file($this->root . DS . $item)) {
        $newModified = filemtime($this->root . DS . $item);
      } else {      
        $object      = new static($this->root . DS . $item);
        $newModified = $object->modified();
      }
      $modified = ($newModified > $modified) ? $newModified : $modified;
    }
    return !is_null($format) ? $handler($format, $modified) : $modified;
  }
public function modified ( $ format = null , $ handler = 'date' ) { $ modified = filemtime ( $ this -> root ) ; $ items = $ this -> scan ( array ( '.' , '..' ) ) ; foreach ( $ items AS $ item ) { if ( is_file ( $ this -> root . DS . $ item ) ) { $ newModified = filemtime ( $ this -> root . DS . $ item ) ; } else { $ object = new static ( $ this -> root . DS . $ item ) ; $ newModified = $ object -> modified ( ) ; } $ modified = ( $ newModified > $ modified ) ? $ newModified : $ modified ; } return ! is_null ( $ format ) ? $ handler ( $ format , $ modified ) : $ modified ; }
Recursively check when the dir and all
 subfolders have been modified for the last time.
Recursively check when the dir and all subfolders have been modified for the last time .