fs::delete_folder (public)

 fs::delete_folder -folder_id folder_id [ -cascade_p cascade_p ] \
    [ -parent_id parent_id ] [ -no_callback ] [ -no_notifications ]

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

Deletes a folder and all contents. Note that we do not perform filesystem operations here. A trigger on cr_revisions informs the content repository about the deletion and periodic cleanup of files to be deleted is performed in a scheduled procedure.

Switches:
-folder_id (required)
-cascade_p (optional, defaults to "t")
-parent_id (optional)
-no_callback (optional, boolean)
-no_notifications (optional, boolean)

Partial Call Graph (max 5 caller/called nodes):
%3 test_fs_create_folder_using_api fs_create_folder_using_api (test file-storage) fs::delete_folder fs::delete_folder test_fs_create_folder_using_api->fs::delete_folder ad_conn ad_conn (public) fs::delete_folder->ad_conn callback callback (public) fs::delete_folder->callback db_exec_plsql db_exec_plsql (public) fs::delete_folder->db_exec_plsql fs::do_notifications fs::do_notifications (public) fs::delete_folder->fs::do_notifications fs::get_object_name fs::get_object_name (public) fs::delete_folder->fs::get_object_name fs::install::before_uninstantiate fs::install::before_uninstantiate (private) fs::install::before_uninstantiate->fs::delete_folder packages/file-storage/www/delete.tcl packages/file-storage/ www/delete.tcl packages/file-storage/www/delete.tcl->fs::delete_folder packages/file-storage/www/folder-delete.tcl packages/file-storage/ www/folder-delete.tcl packages/file-storage/www/folder-delete.tcl->fs::delete_folder packages/file-storage/www/move.tcl packages/file-storage/ www/move.tcl packages/file-storage/www/move.tcl->fs::delete_folder

Testcases:
fs_create_folder_using_api
Source code:
    if {!$no_callback_p} {
        callback fs::folder_delete  -package_id [ad_conn package_id]  -folder_id $folder_id
    }

    if {$parent_id eq ""} {
        set parent_id [fs::get_parent -item_id $folder_id]
    }

    set version_name [get_object_name -object_id $folder_id]

    if { !$no_notifications_p } {
        fs::do_notifications  -folder_id $parent_id  -filename $version_name  -item_id $folder_id  -action "delete_folder"
    }

    db_exec_plsql delete_folder {}
Generic XQL file:
packages/file-storage/tcl/file-storage-procs.xql

PostgreSQL XQL file:
<fullquery name="fs::delete_folder.delete_folder">
    <querytext>
       select content_folder__del(:folder_id, :cascade_p)
     </querytext>
</fullquery>
packages/file-storage/tcl/file-storage-procs-postgresql.xql

Oracle XQL file:
<fullquery name="fs::delete_folder.delete_folder">
    <querytext>
	select file_storage.delete_folder(:folder_id, :cascade_p ) from dual
      </querytext>
</fullquery>
packages/file-storage/tcl/file-storage-procs-oracle.xql

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