copy_file (scripted)
db_with_handle -dbn $dbn __DB {
set s [ns_pg_bind 0or1row $__DB {select file_storage__copy_file(CAST(:file_id AS integer),CAST(:target_folder_id AS integer),CAST(:creation_user AS integer),:creation_ip,:name,:title)}]
return [ns_set value $s 0]
}
delete_file (scripted)
db_with_handle -dbn $dbn __DB {
set s [ns_pg_bind 0or1row $__DB {select file_storage__delete_file(CAST(:file_id AS integer))}]
return [ns_set value $s 0]
}
delete_folder (scripted)
db_with_handle -dbn $dbn __DB {
set s [ns_pg_bind 0or1row $__DB {select file_storage__delete_folder(CAST(:folder_id AS integer),:cascade_p)}]
return [ns_set value $s 0]
}
delete_version (scripted)
db_with_handle -dbn $dbn __DB {
set s [ns_pg_bind 0or1row $__DB {select file_storage__delete_version(CAST(:file_id AS integer),CAST(:version_id AS integer))}]
return [ns_set value $s 0]
}
get_content_type (scripted)
db_with_handle -dbn $dbn __DB {
set s [ns_pg_bind 0or1row $__DB {select file_storage__get_content_type(CAST(:file_id AS integer))}]
return [ns_set value $s 0]
}
get_folder_name (scripted)
db_with_handle -dbn $dbn __DB {
set s [ns_pg_bind 0or1row $__DB {select file_storage__get_folder_name(CAST(:folder_id AS integer))}]
return [ns_set value $s 0]
}
get_package_id (scripted)
db_with_handle -dbn $dbn __DB {
set s [ns_pg_bind 0or1row $__DB {select file_storage__get_package_id(CAST(:item_id AS integer))}]
return [ns_set value $s 0]
}
get_parent_id (scripted)
db_with_handle -dbn $dbn __DB {
set s [ns_pg_bind 0or1row $__DB {select file_storage__get_parent_id(CAST(:item_id AS integer))}]
return [ns_set value $s 0]
}
get_root_folder (scripted)
db_with_handle -dbn $dbn __DB {
set s [ns_pg_bind 0or1row $__DB {select file_storage__get_root_folder(CAST(:package_id AS integer))}]
return [ns_set value $s 0]
}
get_title (scripted)
db_with_handle -dbn $dbn __DB {
set s [ns_pg_bind 0or1row $__DB {select file_storage__get_title(CAST(:item_id AS integer))}]
return [ns_set value $s 0]
}
move_file (scripted)
db_with_handle -dbn $dbn __DB {
set s [ns_pg_bind 0or1row $__DB {select file_storage__move_file(CAST(:file_id AS integer),CAST(:target_folder_id AS integer),CAST(:creation_user AS integer),:creation_ip)}]
return [ns_set value $s 0]
}
new_file (scripted)
db_with_handle -dbn $dbn __DB {
set s [ns_pg_bind 0or1row $__DB {select file_storage__new_file(:name,CAST(:folder_id AS integer),CAST(:user_id AS integer),:creation_ip,:indb_p,CAST(:item_id AS integer),CAST(:package_id AS integer))}]
return [ns_set value $s 0]
}
new_folder (scripted)
db_with_handle -dbn $dbn __DB {
set s [ns_pg_bind 0or1row $__DB {select file_storage__new_folder(:name,:folder_name,CAST(:parent_id AS integer),CAST(:creation_user AS integer),:creation_ip)}]
return [ns_set value $s 0]
}
new_root_folder (scripted)
db_with_handle -dbn $dbn __DB {
set s [ns_pg_bind 0or1row $__DB {select file_storage__new_root_folder(CAST(:package_id AS integer),:folder_name,:url,:description)}]
return [ns_set value $s 0]
}
new_version (scripted)
db_with_handle -dbn $dbn __DB {
set s [ns_pg_bind 0or1row $__DB {select file_storage__new_version(:filename,:description,:mime_type,CAST(:item_id AS integer),CAST(:creation_user AS integer),:creation_ip)}]
return [ns_set value $s 0]
}
rename_file (scripted)
db_with_handle -dbn $dbn __DB {
set s [ns_pg_bind 0or1row $__DB {select file_storage__rename_file(CAST(:file_id AS integer),:name)}]
return [ns_set value $s 0]
}