original_string: private function _clean($dir, $mode)
      {
          $d = @dir($dir);
          if (!$d) {
              return false;
          }
          $result = true;
          while (false !== ($file = $d->read())) {
              if ($file == '.' || $file == '..') {
                  continue;
              }
              $file = $d->path . $file;
              if (is_dir($file)) {
                  $result = ($this->_clean($file .'/', $mode)) && ($result);
              } else {
                  if ($mode == Zend_Cache::CLEANING_MODE_ALL) {
                      $result = ($this->_remove($file)) && ($result);
                  } else if ($mode == Zend_Cache::CLEANING_MODE_OLD) {
                      // Files older than lifetime get deleted from cache
                      if ($this->_directives['lifetime'] !== null) {
                          if ((time() - @filemtime($file)) > $this->_directives['lifetime']) {
                              $result = ($this->_remove($file)) && ($result);
                          }
                      }
                  }
              }
          }
          $d->close();
          return $result;
      }
code: private function _clean($dir, $mode)
      {
          $d = @dir($dir);
          if (!$d) {
              return false;
          }
          $result = true;
          while (false !== ($file = $d->read())) {
              if ($file == '.' || $file == '..') {
                  continue;
              }
              $file = $d->path . $file;
              if (is_dir($file)) {
                  $result = ($this->_clean($file .'/', $mode)) && ($result);
              } else {
                  if ($mode == Zend_Cache::CLEANING_MODE_ALL) {
                      $result = ($this->_remove($file)) && ($result);
                  } else if ($mode == Zend_Cache::CLEANING_MODE_OLD) {
                      // Files older than lifetime get deleted from cache
                      if ($this->_directives['lifetime'] !== null) {
                          if ((time() - @filemtime($file)) > $this->_directives['lifetime']) {
                              $result = ($this->_remove($file)) && ($result);
                          }
                      }
                  }
              }
          }
          $d->close();
          return $result;
      }
code_tokens: private function _clean ( $ dir , $ mode ) { $ d = @ dir ( $ dir ) ; if ( ! $ d ) { return false ; } $ result = true ; while ( false !== ( $ file = $ d -> read ( ) ) ) { if ( $ file == '.' || $ file == '..' ) { continue ; } $ file = $ d -> path . $ file ; if ( is_dir ( $ file ) ) { $ result = ( $ this -> _clean ( $ file . '/' , $ mode ) ) && ( $ result ) ; } else { if ( $ mode == Zend_Cache :: CLEANING_MODE_ALL ) { $ result = ( $ this -> _remove ( $ file ) ) && ( $ result ) ; } else if ( $ mode == Zend_Cache :: CLEANING_MODE_OLD ) { // Files older than lifetime get deleted from cache if ( $ this -> _directives [ 'lifetime' ] !== null ) { if ( ( time ( ) - @ filemtime ( $ file ) ) > $ this -> _directives [ 'lifetime' ] ) { $ result = ( $ this -> _remove ( $ file ) ) && ( $ result ) ; } } } } } $ d -> close ( ) ; return $ result ; }
docstring: Clean a directory and recursivly go over it's subdirectories
  
  Remove all the cached files that need to be cleaned (according to mode and files mtime)
  
  @param  string $dir  Path of directory ot clean
  @param  string $mode The same parameter as in Zend_Cache_Backend_ZendPlatform::clean()
  @return boolean True if ok
docstring_tokens: Clean a directory and recursivly go over it s subdirectories