fs::get_folder_contents_count (public)
fs::get_folder_contents_count [ -folder_id folder_id ] \ [ -user_id user_id ]
Defined in packages/file-storage/tcl/file-storage-procs.tcl
Retrieve the count of contents of the specified folder.
- Switches:
- -folder_id (optional)
- The folder for which to retrieve contents
- -user_id (optional)
- DEPRECATED since commit 2002-02-22 by Yonatan Feldman (yon@milliped.com) this parameter doesn't have any effect. It was used to count only items where user had read permission, but was considered unscalable.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- fs_add_file_to_folder
Source code: if {$folder_id eq ""} { set folder_id [get_root_folder -package_id [ad_conn package_id]] } if {$user_id ne ""} { ns_log warning "fs::get_folder_contents_count:" "specified -user_id doesn't have any effect on proc result" } return [db_string select_folder_contents_count {}]Generic XQL file: <fullquery name="fs::get_folder_contents_count.select_folder_contents_count"> <querytext> select count(*) from fs_objects where parent_id = :folder_id </querytext> </fullquery>packages/file-storage/tcl/file-storage-procs.xql
PostgreSQL XQL file: packages/file-storage/tcl/file-storage-procs-postgresql.xql
Oracle XQL file: packages/file-storage/tcl/file-storage-procs-oracle.xql