FCKeditor

GetFiles

From FCKeditor Docs

Jump to: navigation, search
Note: This information is intented for programmers interested in modifying the CKFinder core.
If you are interested in installing/configuring CFKinder, please take a look at Developer's Guide.

GetFiles

Gets the list of files in a folder.

Sample Request

Get files from the /Docs/ folder of the resource type “Images”.

connector.php?command=GetFiles&type=Images&currentFolder=%2FDocs%2F

Sample Response

<?xml version="1.0" encoding="utf-8"?>
<Connector resourceType="Files">
 <Error number="0" />
 <CurrentFolder path="/" url="/userfiles/images/Docs/" acl="255" />
 <Files>
 <File name="File 1.jpg" date="200703280036" size="111" />
 <File name="Another.gif" date="200705192236" size="1588" />
 <File name="測試1.jpg" date="200703280015" size="35" />
 </Files>
</Connector>

Note that the file names may contain non ASC-II chars, like the following example with Chinese characters.

The “date” attribute correspond to the time of last file modification in the format YYYYMMDDHHmm, where:

  • YYYY : Year (4 digits)
  • MM : Month (2 digits with padding zero)
  • DD : Day (2 digits with padding zero)
  • HH : Hour (24 hours format - 2 digits with padding zero)
  • mm : Minute (2 digits with padding zero)


The “size” attribute is in kilobytes. If size is greater than 0 and less than 1024 bytes, return 1:

if ($size && $size<1024) {
 $size = 1;
}
else {
 $size = (int)round($size / 1024);
}

(sample implementation in PHP)

Personal tools
Powered by MediaWiki