API docs     >     Files     >     FileMgr

FileMgr->getFilesFromFolder

Description

getFilesFromFolder ( $fileId, $sortby = '', $filetype = '', $filter = '' )
Gets a list of Files from a File folder

Parameters

$fileId
int
Id of the parent File folder from which the list will be created
$sortby
string
Column to use for sorting: "title", "filename" or "filesize"
$filetype
string
Filetype
$filter
string
(optional) If "TRASHCAN", only items in the Trash will be returned

Returns

array|false
Array of Pages or FALSE in case of an error
  1. array(
  2.     [0] => array(
  3.         ['OBJECTID'] => 329
  4.         ['PNAME'] => 'a78e2811f2dc2ba5_2'
  5.         ['ID'] => 926
  6.         ['FILENAME'] => 'a78e2811f2dc2ba5.jpg'
  7.         ['FILESIZE'] => 62197
  8.         ['FILETYPE'] => 2
  9.         ['VERSION'] => 2
  10.         ['THUMBVERSION'] => 1
  11.         ['TEXT'] => 'TXT_FILE_H_NEWVERSION'
  12.         ['DATETIME'] => 1349976943
  13.         ['UID'] => 1
  14.         ['TYPENAME'] => 'Image'
  15.         ['CODE'] => 'IMG'
  16.         ['IDENTIFIER'] => 'IMG'
  17.         ['COLOR'] => 'purple'
  18.         ['EXTENSION'] => 'jpg'
  19.         ['OID'] => 926
  20.         ['NAME'] => 'a78e2811f2dc2ba5'
  21.         ['DESCRIPTION'] => NULL
  22.         [01] => NULL
  23.         [03] => NULL
  24.         [05] => NULL
  25.         [07] => NULL
  26.         [10] => NULL
  27.         [12] => NULL
  28.         [14] => NULL
  29.         [16] => NULL
  30.         [18] => NULL
  31.         [20] => NULL
  32.         [22] => NULL
  33.         ['sdfsdfsdf'] => NULL
  34.     )
  35.     ...
  36. )