fs::publish_folder_to_file_system (public)
fs::publish_folder_to_file_system -folder_id folder_id [ -path path ] \ [ -folder_name folder_name ] [ -user_id user_id ]
Defined in packages/file-storage/tcl/file-storage-procs.tcl
publish the contents of a file storage folder to the filesystem
- Switches:
- -folder_id (required)
- -path (optional)
- -folder_name (optional)
- -user_id (optional)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- fs_publish_file
Source code: if {$path eq ""} { set path [ad_tmpnam] } if {$folder_name eq ""} { set folder_name [get_object_name -object_id $folder_id] } set folder_name [ad_sanitize_filename -collapse_spaces -tolower $folder_name] set dir [ad_file join $path $folder_name] # set dir [ad_file join $path "download"] file mkdir $dir db_foreach get_folder_contents { select object_id, name from fs_objects where parent_id = :folder_id and acs_permission.permission_p(object_id, :user_id, 'read') = 't' order by sort_key, name } { set file_name [ad_sanitize_filename -collapse_spaces -tolower $name] publish_object_to_file_system -object_id $object_id -path $dir -file_name $file_name -user_id $user_id } return $dirGeneric XQL file: 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