original_string: protected function scanFolderContents($fullFolderPath)
      {
          $result = [
              'files' => [],
              'folders' => []
          ];
  
          $files = $this->getStorageDisk()->files($fullFolderPath);
          foreach ($files as $file) {
              if ($libraryItem = $this->initLibraryItem($file, MediaLibraryItem::TYPE_FILE)) {
                  $result['files'][] = $libraryItem;
              }
          }
  
          $folders = $this->getStorageDisk()->directories($fullFolderPath);
          foreach ($folders as $folder) {
              if ($libraryItem = $this->initLibraryItem($folder, MediaLibraryItem::TYPE_FOLDER)) {
                  $result['folders'][] = $libraryItem;
              }
          }
  
          return $result;
      }
code: protected function scanFolderContents($fullFolderPath)
      {
          $result = [
              'files' => [],
              'folders' => []
          ];
  
          $files = $this->getStorageDisk()->files($fullFolderPath);
          foreach ($files as $file) {
              if ($libraryItem = $this->initLibraryItem($file, MediaLibraryItem::TYPE_FILE)) {
                  $result['files'][] = $libraryItem;
              }
          }
  
          $folders = $this->getStorageDisk()->directories($fullFolderPath);
          foreach ($folders as $folder) {
              if ($libraryItem = $this->initLibraryItem($folder, MediaLibraryItem::TYPE_FOLDER)) {
                  $result['folders'][] = $libraryItem;
              }
          }
  
          return $result;
      }
code_tokens: protected function scanFolderContents ( $ fullFolderPath ) { $ result = [ 'files' => [ ] , 'folders' => [ ] ] ; $ files = $ this -> getStorageDisk ( ) -> files ( $ fullFolderPath ) ; foreach ( $ files as $ file ) { if ( $ libraryItem = $ this -> initLibraryItem ( $ file , MediaLibraryItem :: TYPE_FILE ) ) { $ result [ 'files' ] [ ] = $ libraryItem ; } } $ folders = $ this -> getStorageDisk ( ) -> directories ( $ fullFolderPath ) ; foreach ( $ folders as $ folder ) { if ( $ libraryItem = $ this -> initLibraryItem ( $ folder , MediaLibraryItem :: TYPE_FOLDER ) ) { $ result [ 'folders' ] [ ] = $ libraryItem ; } } return $ result ; }
docstring: Fetches the contents of a folder from the Library.
  @param string $fullFolderPath Specifies the folder path relative the the storage disk root.
  @return array Returns an array containing two elements - 'files' and 'folders', each is an array of MediaLibraryItem objects.
docstring_tokens: Fetches the contents of a folder from the Library .