original_string: public static function touch($file_path = null, array &$logs = array())
      {
          if (is_null($file_path)) {
              return null;
          }
          if (!file_exists($file_path)) {
              $target_dir = dirname($file_path);
              $ok = !file_exists($target_dir) ? Directory::create($target_dir) : true;
          } else {
              $ok = true;
          }
          if (touch($file_path)) {
              clearstatcache();
              return true;
          } else {
              $logs[] = sprintf('Can not touch file "%s".', $file_path);
          }
          return false;
      }
code: public static function touch($file_path = null, array &$logs = array())
      {
          if (is_null($file_path)) {
              return null;
          }
          if (!file_exists($file_path)) {
              $target_dir = dirname($file_path);
              $ok = !file_exists($target_dir) ? Directory::create($target_dir) : true;
          } else {
              $ok = true;
          }
          if (touch($file_path)) {
              clearstatcache();
              return true;
          } else {
              $logs[] = sprintf('Can not touch file "%s".', $file_path);
          }
          return false;
      }
code_tokens: public static function touch ( $ file_path = null , array & $ logs = array ( ) ) { if ( is_null ( $ file_path ) ) { return null ; } if ( ! file_exists ( $ file_path ) ) { $ target_dir = dirname ( $ file_path ) ; $ ok = ! file_exists ( $ target_dir ) ? Directory :: create ( $ target_dir ) : true ; } else { $ ok = true ; } if ( touch ( $ file_path ) ) { clearstatcache ( ) ; return true ; } else { $ logs [ ] = sprintf ( 'Can not touch file "%s".' , $ file_path ) ; } return false ; }
docstring: Create an empty file or touch an existing file
  
  @param   string  $file_path
  @param   array   $logs   Logs registry passed by reference
  @return  bool
docstring_tokens: Create an empty file or touch an existing file