GetFiles

This website contains links to software which is either no longer maintained or will be supported only until the end of 2019 (CKFinder 2). For the latest documentation about current CKSource projects, including software like CKEditor 4/CKEditor 5, CKFinder 3, Cloud Services, Letters, Accessibility Checker, please visit the new documentation website.

If you look for an information about very old versions of CKEditor, FCKeditor and CKFinder check also the CKEditor forum, which was closed in 2015. If not, please head to StackOverflow for support.

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 the 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)

This page was last edited on 28 May 2010, at 07:46.