User Tools

Site Tools


dev:sapi:get_dir

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
dev:sapi:get_dir [2022/04/20 16:47] vikkidev:sapi:get_dir [2022/04/20 18:08] (current) – [fields] vikki
Line 7: Line 7:
 **Description:** Returns a list of items representing the directory listing of the given folder. Information for each item in the list can be optionally requested. Among the information available are: name, date, mtime, size, type, owner, company, lock status, description, checksum. Sorting of the list by selected fields and simple filtering of names is possible. **Description:** Returns a list of items representing the directory listing of the given folder. Information for each item in the list can be optionally requested. Among the information available are: name, date, mtime, size, type, owner, company, lock status, description, checksum. Sorting of the list by selected fields and simple filtering of names is possible.
  
-**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:
   * <ff:'Courier New'>path=/Company Share</ff> - list items in "Company Share"   * <ff:'Courier New'>path=/Company Share</ff> - list items in "Company Share"
   * <ff:'Courier New'>path=/</ff> - list the toplevel folders available to the user.   * <ff:'Courier New'>path=/</ff> - list the toplevel folders available to the user.
- 
----- 
  
 ==== 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 "email" e.g. name@host that identifies a user account, but does not necessarily mean a valid email address. Only applicable to files and NOT folders. For folders, this value is always empty. The (legacy) lock value above is "yes" if this value is not empty.   * **lock_owner** is the lock owner for a lock placed on the item. Value is in the form of and "email" e.g. name@host that identifies a user account, but does not necessarily mean a valid email address. Only applicable to files and NOT folders. For folders, this value is always empty. The (legacy) lock value above is "yes" if this value is not empty.
- 
----- 
  
 ==== 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:\\ 
-<ff:'Courier New'>*.txt</ff> - list all text files (.txt .TXT ...)\\  +  * <ff:'Courier New'>*.txt</ff> - list all text files (.txt .TXT ...) 
-<ff:'Courier New'>a*</ff> - begining with letter "a" or "A"\\  +  <ff:'Courier New'>a*</ff> - begining with letter "a" or "A" 
-<ff:'Courier New'>file*.?</ff> - filenames ending with a single letter extension\\  +  <ff:'Courier New'>file*.?</ff> - filenames ending with a single letter extension 
-<ff:'Courier New'>* *</ff> - filenames with at least a space in them.\\  +  <ff:'Courier New'>* *</ff> - filenames with at least a space in them. 
-<ff:'Courier New'>*[ho]</ff> - list filename ending with either "h" or "o"\\ +  <ff:'Courier New'>*[ho]</ff> - list filename ending with either "h" or "o" 
 Multiple patterns are specified with comma separating them, example, *.jpeg,*.jpg Multiple patterns are specified with comma separating them, example, *.jpeg,*.jpg
  
----- 
  
 +==== sortby =====
 +name | size | date | mtime\\ 
 += name (sort by name is the default) 
 +
 +The listing will be sorted by the field specified. Since 'date' and 'mtime' comes from the same property, they produce the same sorting order.
 +
 +
 +==== sorthow ====
 += ascend | descend\\ 
 += ascend (sort by ascending manner by default)
 +
 +
 +==== ofmt ====
 += null | json | jsonp
 +
 +  * null is the default, and the legacy "flat" output format is returned.
 +  * json means the output format is in JSON format
 +  * jsonp is like json, but in "pretty" form for easier human readability.
dev/sapi/get_dir.1650444464.txt.gz · Last modified: 2022/04/20 16:47 by vikki