fs::get_folder_contents (public, deprecated)
fs::get_folder_contents [ -folder_id folder_id ] [ -user_id user_id ] \ [ -n_past_days n_past_days ]
Defined in packages/file-storage/tcl/file-storage-procs.tcl
Deprecated. Invoking this procedure generates a warning.
WARNING: This proc is not scalable because it does too many permission checks. DRB: Not so true now that permissions are fast. However, it is now only used to clone files in dotLRN and for the somewhat brain-damaged syllabus package. At minimum the permission checks returned by the code can be removed. Most of the other fields as well. Oh well ... REMOVE WHEN SYLLABUS IS REWRITTEN TO FIND ITS FILE INTELLIGENTLY Retrieve the contents of the specified folder in the form of a list of ns_sets, one for each row returned. The keys for each row are as follows: object_id, name, live_revision, type, last_modified, new_p, content_size, file_upload_name write_p, delete_p, admin_p, DEPRECATED: this proc has been evidently the subject of controversy over the years. To this day (2023-03-17) no package seems to be using it. One can either query the database directly or use other existing apis to retrieve the folder children and then fetch the needed metadata via other means.
- Switches:
- -folder_id (optional)
- The folder for which to retrieve contents
- -user_id (optional)
- The viewer of the contents (to make sure they have permission)
- -n_past_days (optional, defaults to
"99999"
)- Mark files that are newer than the past N days as new
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.