original_string: public function folderExists($path)
      {
          $folderName = basename($path);
          $folderPath = dirname($path);
  
          $path = self::validatePath($folderPath);
          $fullPath = $this->getMediaPath($path);
  
          $folders = $this->getStorageDisk()->directories($fullPath);
          foreach ($folders as $folder) {
              if (basename($folder) == $folderName) {
                  return true;
              }
          }
  
          return false;
      }
code: public function folderExists($path)
      {
          $folderName = basename($path);
          $folderPath = dirname($path);
  
          $path = self::validatePath($folderPath);
          $fullPath = $this->getMediaPath($path);
  
          $folders = $this->getStorageDisk()->directories($fullPath);
          foreach ($folders as $folder) {
              if (basename($folder) == $folderName) {
                  return true;
              }
          }
  
          return false;
      }
code_tokens: public function folderExists ( $ path ) { $ folderName = basename ( $ path ) ; $ folderPath = dirname ( $ path ) ; $ path = self :: validatePath ( $ folderPath ) ; $ fullPath = $ this -> getMediaPath ( $ path ) ; $ folders = $ this -> getStorageDisk ( ) -> directories ( $ fullPath ) ; foreach ( $ folders as $ folder ) { if ( basename ( $ folder ) == $ folderName ) { return true ; } } return false ; }
docstring: Determines if a folder with the specified path exists in the library.
  @param string $path Specifies the folder path relative the the Library root.
  @return boolean Returns TRUE if the folder exists.
docstring_tokens: Determines if a folder with the specified path exists in the library .