This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
dev:sapi:get_dir [2022/04/20 16:46] – [path] vikki | dev:sapi:get_dir [2022/04/20 18:08] (current) – [fields] vikki | ||
---|---|---|---|
Line 7: | Line 7: | ||
**Description: | **Description: | ||
- | **INPUT (via GET or POST)** | + | ---- |
- | Mandatory parameters are: **sid**, **path**\\ | + | ===== INPUT (via GET or POST) ===== |
- | Optional parameters are: **fields**, **filter**, **sortby**, **sorthow**, **ofmt** | + | |
+ | Mandatory parameters are: **sid, path**\\ | ||
+ | Optional parameters are: **fields, filter, sortby, sorthow, ofmt** | ||
- | ---- | ||
==== sid ==== | ==== sid ==== | ||
Session id of the login user. [mandatory] | Session id of the login user. [mandatory] | ||
- | |||
- | ---- | ||
==== path ==== | ==== path ==== | ||
Line 28: | Line 27: | ||
* < | * < | ||
* < | * < | ||
- | |||
- | ---- | ||
==== fields ==== | ==== fields ==== | ||
Line 49: | Line 46: | ||
* **checksum** is the 128-bit MD5 checksum of the file represented as lowercased 32 hex digits. This only applies to files. WARNING: For folders, the value returned will be empty/null, without any errors being flagged. | * **checksum** is the 128-bit MD5 checksum of the file represented as lowercased 32 hex digits. This only applies to files. WARNING: For folders, the value returned will be empty/null, without any errors being flagged. | ||
* **lock_owner** is the lock owner for a lock placed on the item. Value is in the form of and " | * **lock_owner** is the lock owner for a lock placed on the item. Value is in the form of and " | ||
- | |||
- | ---- | ||
==== filter ==== | ==== filter ==== | ||
Line 56: | Line 51: | ||
List only items with name matching pattern using wild cards, *, ? and []\\ | List only items with name matching pattern using wild cards, *, ? and []\\ | ||
The match is done case-insensitive. Example: | The match is done case-insensitive. Example: | ||
- | *.txt - list all text files (.txt .TXT ...)\\ | + | * < |
- | a* - begining with letter " | + | * < |
- | file*.? - filenames ending with a single letter extension\\ | + | * < |
- | * * - filenames with at least a space in them.\\ | + | * < |
- | *[ho] - list filename ending with either " | + | * < |
- | | + | |
+ | Multiple patterns are specified with comma separating them, example, *.jpeg, | ||
+ | |||
+ | |||
+ | ==== sortby ===== | ||
+ | name | size | date | mtime\\ | ||
+ | = name (sort by name is the default) | ||
+ | |||
+ | The listing will be sorted by the field specified. Since ' | ||
+ | |||
+ | |||
+ | ==== sorthow ==== | ||
+ | = ascend | descend\\ | ||
+ | = ascend (sort by ascending manner by default) | ||
+ | |||
+ | |||
+ | ==== ofmt ==== | ||
+ | = null | json | jsonp | ||
+ | |||
+ | * null is the default, and the legacy " | ||
+ | * json means the output format is in JSON format | ||
+ | * jsonp is like json, but in " |