original_string: public function upload(string $name): bool
      {
          $app = $this->getContainer();
          $config = $this->destination($name, $recursively);
  
          try {
              $basePath = "{$config->basePath}{$name}/";
  
              $this->changePermission(
                  $config->workingPath, 0777, $config->recursively
              );
  
              $this->prepareDirectory($basePath, 0777);
          } catch (RuntimeException $e) {
              // We found an exception with Filesystem, but it would be hard to say
              // extension can't be activated, let's try activating the
              // extension and if it failed, we should actually catching
              // those exception instead.
          }
  
          $app['orchestra.extension']->activate($name);
  
          $this->changePermission($config->workingPath, 0755, $config->recursively);
  
          return true;
      }
code: public function upload(string $name): bool
      {
          $app = $this->getContainer();
          $config = $this->destination($name, $recursively);
  
          try {
              $basePath = "{$config->basePath}{$name}/";
  
              $this->changePermission(
                  $config->workingPath, 0777, $config->recursively
              );
  
              $this->prepareDirectory($basePath, 0777);
          } catch (RuntimeException $e) {
              // We found an exception with Filesystem, but it would be hard to say
              // extension can't be activated, let's try activating the
              // extension and if it failed, we should actually catching
              // those exception instead.
          }
  
          $app['orchestra.extension']->activate($name);
  
          $this->changePermission($config->workingPath, 0755, $config->recursively);
  
          return true;
      }
code_tokens: public function upload ( string $ name ) : bool { $ app = $ this -> getContainer ( ) ; $ config = $ this -> destination ( $ name , $ recursively ) ; try { $ basePath = "{$config->basePath}{$name}/" ; $ this -> changePermission ( $ config -> workingPath , 0777 , $ config -> recursively ) ; $ this -> prepareDirectory ( $ basePath , 0777 ) ; } catch ( RuntimeException $ e ) { // We found an exception with Filesystem, but it would be hard to say // extension can't be activated, let's try activating the // extension and if it failed, we should actually catching // those exception instead. } $ app [ 'orchestra.extension' ] -> activate ( $ name ) ; $ this -> changePermission ( $ config -> workingPath , 0755 , $ config -> recursively ) ; return true ; }
docstring: Upload the file.
  
  @param  string  $name
  
  @return bool
docstring_tokens: Upload the file .