original_string: public function write($data, $mode = 'w', $force = false)
      {
          $success = false;
          if ($this->open($mode, $force) === true) {
              if ($this->lock !== null && flock($this->handle, LOCK_EX) === false) {
                  return false;
              }
  
              if (fwrite($this->handle, $data) !== false) {
                  $success = true;
              }
              if ($this->lock !== null) {
                  flock($this->handle, LOCK_UN);
              }
          }
  
          return $success;
      }
code: public function write($data, $mode = 'w', $force = false)
      {
          $success = false;
          if ($this->open($mode, $force) === true) {
              if ($this->lock !== null && flock($this->handle, LOCK_EX) === false) {
                  return false;
              }
  
              if (fwrite($this->handle, $data) !== false) {
                  $success = true;
              }
              if ($this->lock !== null) {
                  flock($this->handle, LOCK_UN);
              }
          }
  
          return $success;
      }
code_tokens: public function write ( $ data , $ mode = 'w' , $ force = false ) { $ success = false ; if ( $ this -> open ( $ mode , $ force ) === true ) { if ( $ this -> lock !== null && flock ( $ this -> handle , LOCK_EX ) === false ) { return false ; } if ( fwrite ( $ this -> handle , $ data ) !== false ) { $ success = true ; } if ( $ this -> lock !== null ) { flock ( $ this -> handle , LOCK_UN ) ; } } return $ success ; }
docstring: Write given data to this file.
  
  @param string $data Data to write to this File.
  @param string $mode Mode of writing. {@link https://secure.php.net/fwrite See fwrite()}.
  @param bool $force Force the file to open
  @return bool Success
docstring_tokens: Write given data to this file .