Line 1: | Line 1: | ||
+ | {{CKFinder_SSI_Warning}} | ||
== GetFiles == | == GetFiles == | ||
Revision as of 15:34, 16 January 2008
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¤tFolder=%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)