fs::new_root_folder (public)

 fs::new_root_folder [ -package_id package_id ] \
    [ -pretty_name pretty_name ] [ -description description ] \
    [ -name name ]

Defined in packages/file-storage/tcl/file-storage-procs.tcl

Create a root folder for a package instance.

Switches:
-package_id (optional)
Package instance associated with this root folder
-pretty_name (optional)
-description (optional)
-name (optional)
Returns:
folder_id of the new root folder

Partial Call Graph (max 5 caller/called nodes):
%3 test_fs_add_delete_copy fs_add_delete_copy (test file-storage) fs::new_root_folder fs::new_root_folder test_fs_add_delete_copy->fs::new_root_folder ad_conn ad_conn (public) fs::new_root_folder->ad_conn apm_instance_name_from_id apm_instance_name_from_id (public) fs::new_root_folder->apm_instance_name_from_id db_exec_plsql db_exec_plsql (public) fs::new_root_folder->db_exec_plsql fs::install::after_instantiate fs::install::after_instantiate (private) fs::install::after_instantiate->fs::new_root_folder packages/attachments/www/admin/new-root-folder-map-2.tcl packages/attachments/ www/admin/new-root-folder-map-2.tcl packages/attachments/www/admin/new-root-folder-map-2.tcl->fs::new_root_folder

Testcases:
fs_add_delete_copy
Source code:

    if {$package_id eq ""} {
        set package_id [ad_conn package_id]
    }

    if {$pretty_name eq ""} {
        set pretty_name [apm_instance_name_from_id $package_id]
    }

    if {$name eq ""} {
        set name "file-storage_${package_id}"
    }

    return [db_exec_plsql new_root_folder {}]
Generic XQL file:
packages/file-storage/tcl/file-storage-procs.xql

PostgreSQL XQL file:
<fullquery name="fs::new_root_folder.new_root_folder">
    <querytext>
	select file_storage__new_root_folder (
	    :package_id,
            :pretty_name, -- label
	    :name, -- name
	    :description
        )
        </querytext>
</fullquery>
packages/file-storage/tcl/file-storage-procs-postgresql.xql

Oracle XQL file:
<fullquery name="fs::new_root_folder.new_root_folder">
    <querytext>
            begin
                :1 := file_storage.new_root_folder(
	 	    folder_url => :name,
		    package_id => :package_id,
                    folder_name => :pretty_name,
		    description => :description
                );
            end;
        </querytext>
</fullquery>
packages/file-storage/tcl/file-storage-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: