fs::new_folder (public)
fs::new_folder -name name -pretty_name pretty_name \ -parent_id parent_id [ -creation_user creation_user ] \ [ -creation_ip creation_ip ] [ -description description ] \ [ -package_id package_id ] [ -no_callback ]
Defined in packages/file-storage/tcl/file-storage-procs.tcl
Create a new folder.
- Switches:
- -name (required)
- Internal name of the folder, must be unique under a given parent_id
- -pretty_name (required)
- What we show to users of the system
- -parent_id (required)
- Where we create this folder
- -creation_user (optional)
- Who created this folder
- -creation_ip (optional)
- What is the IP address of the creation_user
- -description (optional)
- of the folder. Not used in the current FS UI but might be used elsewhere.
- -package_id (optional)
- Package_id of the package for which to create the new folder. Preferably a file storage package_id
- -no_callback (optional, boolean)
- defines if the callback should be called. Defaults to yes
- Returns:
- folder_id of the newly created folder
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- fs_publish_file, fs_add_delete_copy, fs_create_folder_using_api, fs_add_file_to_folder
Source code: if {$creation_user eq ""} { set creation_user [ad_conn user_id] } if {$creation_ip eq ""} { set creation_ip [ns_conn peeraddr] } # If the package_id is empty, try the package_id from the parent_object if {$package_id eq ""} { set package_id [acs_object::package_id -object_id $parent_id] # If the package_id from the parent_id exists, make sure it is a file-storage package_id if {$package_id ne ""} { if {[apm_package_key_from_id $package_id] ne "file-storage"} { set package_id "" } } } set folder_id [content::folder::new -name $name -label $pretty_name -parent_id $parent_id -creation_user $creation_user -creation_ip $creation_ip -description $description -package_id $package_id] permission::grant -party_id $creation_user -object_id $folder_id -privilege "admin" if {!$no_callback_p} { callback fs::folder_new -package_id $package_id -folder_id $folder_id } return $folder_idGeneric 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