original_string: public function write(string $uri, $data)
      {
          // Create directory recursively if it doesn't exist
          if ( ! file_exists(dirname($uri))) {
              mkdir(dirname($uri), 0755, true);
          }
  
          // Write file to target directory
          if ( ! file_put_contents($uri, $data)) {
              throw new ErrorException("Failed to write output to file: ".$uri);
          }
  
          return true;
      }
code: public function write(string $uri, $data)
      {
          // Create directory recursively if it doesn't exist
          if ( ! file_exists(dirname($uri))) {
              mkdir(dirname($uri), 0755, true);
          }
  
          // Write file to target directory
          if ( ! file_put_contents($uri, $data)) {
              throw new ErrorException("Failed to write output to file: ".$uri);
          }
  
          return true;
      }
code_tokens: public function write ( string $ uri , $ data ) { // Create directory recursively if it doesn't exist if ( ! file_exists ( dirname ( $ uri ) ) ) { mkdir ( dirname ( $ uri ) , 0755 , true ) ; } // Write file to target directory if ( ! file_put_contents ( $ uri , $ data ) ) { throw new ErrorException ( "Failed to write output to file: " . $ uri ) ; } return true ; }
docstring: Write the data to the storage engine
  @param  string $uri  The URI handle
  @param  mixed $data  The data in whatever format encode outputted
  @return boolean      Whether it was a successful write or not
docstring_tokens: Write the data to the storage engine