original_string: public function releaseResource(AbstractResourceFile $resource) {
          if (is_null($this->getReleaseDir())) {
              throw new Exception("ERROR: RELEASE DIR IS NULL: " . $resource->getRealPath());
          }
          if (!$this->getReleaseDir()->exists()) {
              $this->getReleaseDir()->mkdirs();
          }
          $release_file = $this->makeReleaseFile($resource);
          $release_dir = $release_file->getAbsoluteFile()->getParentFile();
          if (!$release_dir->exists()) {
              if (!$release_dir->mkdirs()) {
                  throw new FileWriteErrorException("The directory '" . $release_dir->getAbsolutePath() . "' create fails.");
              }
          }
          \file_put_contents($release_file->getAbsolutePath(), $resource->getFileContents());
      }
code: public function releaseResource(AbstractResourceFile $resource) {
          if (is_null($this->getReleaseDir())) {
              throw new Exception("ERROR: RELEASE DIR IS NULL: " . $resource->getRealPath());
          }
          if (!$this->getReleaseDir()->exists()) {
              $this->getReleaseDir()->mkdirs();
          }
          $release_file = $this->makeReleaseFile($resource);
          $release_dir = $release_file->getAbsoluteFile()->getParentFile();
          if (!$release_dir->exists()) {
              if (!$release_dir->mkdirs()) {
                  throw new FileWriteErrorException("The directory '" . $release_dir->getAbsolutePath() . "' create fails.");
              }
          }
          \file_put_contents($release_file->getAbsolutePath(), $resource->getFileContents());
      }
code_tokens: public function releaseResource ( AbstractResourceFile $ resource ) { if ( is_null ( $ this -> getReleaseDir ( ) ) ) { throw new Exception ( "ERROR: RELEASE DIR IS NULL: " . $ resource -> getRealPath ( ) ) ; } if ( ! $ this -> getReleaseDir ( ) -> exists ( ) ) { $ this -> getReleaseDir ( ) -> mkdirs ( ) ; } $ release_file = $ this -> makeReleaseFile ( $ resource ) ; $ release_dir = $ release_file -> getAbsoluteFile ( ) -> getParentFile ( ) ; if ( ! $ release_dir -> exists ( ) ) { if ( ! $ release_dir -> mkdirs ( ) ) { throw new FileWriteErrorException ( "The directory '" . $ release_dir -> getAbsolutePath ( ) . "' create fails." ) ; } } \ file_put_contents ( $ release_file -> getAbsolutePath ( ) , $ resource -> getFileContents ( ) ) ; }
docstring: Execute the release action for the resource
  @param AbstractResourceFile $resource The source file to release.
  @throws FileWriteErrorException
docstring_tokens: Execute the release action for the resource