Get a folder content.

@param int $folderid Folder ID.
@return object
970858
public function get_folder_items($folderid = 0) {
        $this->reset_state();
        $result = $this->request($this->make_url("/folders/$folderid/items",
            array('fields' => 'id,name,type,modified_at,size,owned_by')));
        return json_decode($result);
    }
721837
public function get($docId)
    {
        return $this->montage->request(
            'get',
            $this->montage->url('document-detail', $this->schema->name, $docId)
        );
    }
102646
protected function parseFileID($fileID)
    {
        /** @var ParsedFileID $parsedFileID */
        $parsedFileID = $this->getProtectedResolutionStrategy()->parseFileID($fileID);
        return $parsedFileID ? $parsedFileID->getTuple() : null;
    }
107957
public function index($dirId=null)
    {

        if ($dirId == 'index') {
            $dirId = NULL;
        }

        $parentDir = NULL;

        $params = $this->getPassThruParams();

        $dir = $this->getDirectory($dirId);

        if ( isset($params['type']) && $params['type'] == 'image') {
            $this->filterToImages($dir);
        }

        $this->sortChildren($dir);

        $viewParams = [
            'dir' => $dir,
            'parents' => $this->fileDB->getParents($dir),
            'params' => $params,
            'toRoute' => function ($action, $params=[]) {
                return $this->toRoute($action, $params);
             },
            'attributeSetter' => $this->getAttributeProvider($this->getContext())
        ];

        return View::make($this->getTemplate(), $viewParams);
    }
1333597
public function getFolderCreateForm($parentId = 0)
    {
        /** @var FolderCreateFormFactory $factory */
        $factory = Injector::inst()->get(FolderCreateFormFactory::class);
        $form = $factory->getForm($this, 'folderCreateForm', [ 'ParentID' => $parentId ]);

        // Set form action handler with ParentID included
        $form->setRequestHandler(
            LeftAndMainFormRequestHandler::create($form, [ $parentId ])
        );

        return $form;
    }
211835
public function mapContentById($contentId)
    {
        $contentInfo = $this->contentHandler->loadContentInfo($contentId);

        return $this->mapContent(
            $this->contentHandler->load($contentId, $contentInfo->currentVersionNo)
        );
    }
1023207
protected function getDirectory($id=null)
    {
        if($id) {
            return $this->fileDB->getById($id,1);
        }

        try{
            return $this->fileDB->get('/',1);
        } catch(NotInDbException $e) {
            $this->fileDB->syncWithFs('/', 1);
            return $this->fileDB->get('/',1);
        } catch(NotFound $e) {
            $this->fileDB->syncWithFs('/', 1);
            return $this->fileDB->get('/',1);
        }
    }
970199
public function actionIsFolderEmpty($folderId)
    {
        $count = StorageFile::find()->where(['folder_id' => $folderId, 'is_deleted' => false])->count();
        
        return [
            'count' => $count,
            'empty' => $count > 0  ? false : true,
        ];
    }
52789
protected function getDirectory($id)
    {
        $hash = sha1($id, false);
        $dirs = array(
            $this->getCacheDirectory(),
            substr($hash, 0, 2),
            substr($hash, 2, 2)
        );
        return join(DIRECTORY_SEPARATOR, $dirs);
    }
233116
public function countByFolderId($folderId)
    {
        $qb = $this->createQueryBuilder();

        $qb->field('mediaFolder.id')->equals($folderId);

        return $qb->getQuery()->count();
    }
1341450
public function get($addressId)
    {
        $uri = $this->uri . $addressId . '/';
        $response = $this->client->fetch(
            $uri,
            []
        );

        return json_encode($response->getContent(), JSON_FORCE_OBJECT);
    }
735529
public function getPageContent($pageId)
    {
        // Retrieve cache version if front mode to avoid multiple calls
        $melisEngineCacheSystem = $this->getServiceLocator()->get('MelisEngineCacheSystem');
        $pageContent = $melisEngineCacheSystem->getCacheByKey($this->cachekey.$pageId, $this->cacheConfig, true);
        
        return $pageContent;
    }
250704
public function create_folder($foldername, $parentid = 0) {
        $params = array('name' => $foldername, 'parent' => array('id' => (string) $parentid));
        $this->reset_state();
        $result = $this->post($this->make_url("/folders"), json_encode($params));
        $result = json_decode($result);
        return $result;
    }
129972
def get_folder_by_id(self, folder_id):
        
        return self._create_item_response(
            self.data_service.get_folder(folder_id),
            Folder
        )
879413
public function setFolderId( $folder_id )
	{
		$this->folder_id = (is_numeric($folder_id)) ? abs(round($folder_id)) : NULL;

		return $this;
	}
162602
public BoxRequestsFolder.GetFolderWithAllItems getFolderWithAllItems(String folderId) {
        BoxRequestsFolder.GetFolderWithAllItems request = new BoxRequestsFolder.GetFolderWithAllItems(folderId, getFolderInfoUrl(folderId), getFolderItemsUrl(folderId), mSession);
        // For best user experience we do not want to ever request more than 4000 items as more will cause long waits and unwieldy ui
        request.setMaximumLimit(BoxRequestsFolder.GetFolderWithAllItems.DEFAULT_MAX_LIMIT);
        return request;
    }
598939
public function treeNode($treeId)
    {
        $tree = $this->contentTreeManager->findByTreeId($treeId);
        if (!$tree) {
            return null;
        }
        $request = $this->requestStack->getCurrentRequest();
        $tree->setLanguage($request->getLocale());
        $treeNode = $tree->get($treeId);

        return new ContentTreeContext($treeNode);
    }