file-storage-procs.tcl

Tcl library for the file-storage system (v.4)

Location:
packages/file-storage/tcl/file-storage-procs.tcl
Created:
6 November 2000
Author:
Kevin Scaldeferri <kevin@arsdigita.com>
CVS Identification:
$Id: file-storage-procs.tcl,v 1.90.2.42 2024/05/31 13:57:38 antoniop Exp $

Procedures in this file

Detailed information

fs::add_created_file (public, deprecated)

 fs::add_created_file [ -name name ] -parent_id parent_id \
    -package_id package_id [ -item_id item_id ] \
    [ -mime_type mime_type ] [ -creation_user creation_user ] \
    [ -creation_ip creation_ip ] [ -title title ] \
    [ -description description ] [ -content_body content_body ]
Deprecated. Invoking this procedure generates a warning.

Create a new file storage item or add a new revision if an item with the same name and parent folder already exists DEPRECATED: this proc was superseded by fs::add_file

Switches:
-name (optional)
-parent_id (required)
-package_id (required)
-item_id (optional)
-mime_type (optional)
-creation_user (optional)
-creation_ip (optional)
-title (optional)
-description (optional)
-content_body (optional)
Returns:
revision_id
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 ad_conn ad_conn (public) ad_log_deprecated ad_log_deprecated (public) callback callback (public) db_exec_plsql db_exec_plsql (public) db_string db_string (public) fs::add_created_file fs::add_created_file fs::add_created_file->ad_conn fs::add_created_file->ad_log_deprecated fs::add_created_file->callback fs::add_created_file->db_exec_plsql fs::add_created_file->db_string

Testcases:
No testcase defined.

fs::add_created_version (public, deprecated)

 fs::add_created_version -name name -content_body content_body \
    -mime_type mime_type -item_id item_id \
    [ -creation_user creation_user ] [ -creation_ip creation_ip ] \
    [ -title title ] [ -description description ] \
    [ -suppress_notify_p suppress_notify_p ] \
    [ -storage_type storage_type ] [ -package_id package_id ] \
    [ -storage_type storage_type ]
Deprecated. Invoking this procedure generates a warning.

Create a new version of a file storage item using the content passed in content_body DEPRECATED: this proc has been superseded by fs::add_version

Switches:
-name (required)
-content_body (required)
-mime_type (required)
-item_id (required)
-creation_user (optional)
-creation_ip (optional)
-title (optional)
-description (optional)
-suppress_notify_p (optional, defaults to "f")
-storage_type (optional)
-package_id (optional)
-storage_type (optional)
Returns:
revision_id
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 fs::add_created_file fs::add_created_file (public, deprecated) fs::add_created_version fs::add_created_version fs::add_created_file->fs::add_created_version ad_conn ad_conn (public) fs::add_created_version->ad_conn ad_log_deprecated ad_log_deprecated (public) fs::add_created_version->ad_log_deprecated content::revision::new content::revision::new (public) fs::add_created_version->content::revision::new db_string db_string (public) fs::add_created_version->db_string fs::do_notifications fs::do_notifications (public) fs::add_created_version->fs::do_notifications

Testcases:
No testcase defined.

fs::add_file (public)

 fs::add_file -name name -parent_id parent_id -package_id package_id \
    [ -item_id item_id ] [ -creation_user creation_user ] \
    [ -creation_ip creation_ip ] [ -title title ] \
    [ -description description ] [ -tmp_filename tmp_filename ] \
    [ -mime_type mime_type ] [ -no_callback ] [ -no_notification ]

Create a new file storage item or add a new revision if an item with the same name and parent folder already exists

Switches:
-name (required)
-parent_id (required)
-package_id (required)
-item_id (optional)
-creation_user (optional)
-creation_ip (optional)
-title (optional)
-description (optional)
-tmp_filename (optional)
-mime_type (optional)
-no_callback (optional, boolean)
-no_notification (optional, boolean)
Returns:
revision_id

Partial Call Graph (max 5 caller/called nodes):
%3 test_fs_add_delete_copy fs_add_delete_copy (test file-storage) fs::add_file fs::add_file test_fs_add_delete_copy->fs::add_file test_fs_add_file_to_folder fs_add_file_to_folder (test file-storage) test_fs_add_file_to_folder->fs::add_file test_fs_publish_file fs_publish_file (test file-storage) test_fs_publish_file->fs::add_file ad_conn ad_conn (public) fs::add_file->ad_conn callback callback (public) fs::add_file->callback content::item::new content::item::new (public) fs::add_file->content::item::new content::type::content_type_p content::type::content_type_p (public) fs::add_file->content::type::content_type_p cr_check_mime_type cr_check_mime_type (public) fs::add_file->cr_check_mime_type fs::impl::fs_object::put fs::impl::fs_object::put (private) fs::impl::fs_object::put->fs::add_file packages/acs-templating/www/scripts/xinha/file-selector.tcl packages/acs-templating/ www/scripts/xinha/file-selector.tcl packages/acs-templating/www/scripts/xinha/file-selector.tcl->fs::add_file packages/attachments/www/file-add-2.tcl packages/attachments/ www/file-add-2.tcl packages/attachments/www/file-add-2.tcl->fs::add_file packages/file-storage/www/file-add.tcl packages/file-storage/ www/file-add.tcl packages/file-storage/www/file-add.tcl->fs::add_file packages/file-storage/www/folder-add.tcl packages/file-storage/ www/folder-add.tcl packages/file-storage/www/folder-add.tcl->fs::add_file

Testcases:
fs_publish_file, fs_add_delete_copy, fs_add_file_to_folder

fs::add_version (public)

 fs::add_version -item_id item_id [ -name name ] \
    [ -package_id package_id ] [ -mime_type mime_type ] \
    [ -tmp_filename tmp_filename ] [ -content_body content_body ] \
    [ -creation_user creation_user ] [ -creation_ip creation_ip ] \
    [ -title title ] [ -description description ] \
    [ -suppress_notify_p suppress_notify_p ] \
    [ -storage_type storage_type ] [ -no_callback ]

Create a new version of a file storage item.

Switches:
-item_id (required)
-name (optional)
-package_id (optional)
-mime_type (optional)
-tmp_filename (optional)
absolute path to a file on the filesystem. when specified, the new revision data will come from this file.
-content_body (optional)
Text content for the new revision. When 'tmp_filename' is missing, the new revision data will come from here.
-creation_user (optional)
-creation_ip (optional)
-title (optional)
-description (optional)
-suppress_notify_p (optional, defaults to "f")
-storage_type (optional)
-no_callback (optional, boolean)
Returns:
revision_id

Partial Call Graph (max 5 caller/called nodes):
%3 test_fs_add_delete_copy fs_add_delete_copy (test file-storage) fs::add_version fs::add_version test_fs_add_delete_copy->fs::add_version test_fs_add_file_to_folder fs_add_file_to_folder (test file-storage) test_fs_add_file_to_folder->fs::add_version ad_conn ad_conn (public) fs::add_version->ad_conn ad_file ad_file (public) fs::add_version->ad_file callback callback (public) fs::add_version->callback content::item::set_live_revision content::item::set_live_revision (public) fs::add_version->content::item::set_live_revision content::revision::new content::revision::new (public) fs::add_version->content::revision::new fs::add_file fs::add_file (public) fs::add_file->fs::add_version fs::impl::fs_object::put fs::impl::fs_object::put (private) fs::impl::fs_object::put->fs::add_version packages/file-storage/www/file-add.tcl packages/file-storage/ www/file-add.tcl packages/file-storage/www/file-add.tcl->fs::add_version packages/file-storage/www/folder-zip-add.tcl packages/file-storage/ www/folder-zip-add.tcl packages/file-storage/www/folder-zip-add.tcl->fs::add_version

Testcases:
fs_add_delete_copy, fs_add_file_to_folder

fs::after_mount (private)

 fs::after_mount -package_id package_id -node_id node_id

Create root folder for package instance via Tcl callback.

Switches:
-package_id (required)
-node_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 apm_package_installed_p apm_package_installed_p (public) fs::get_root_folder fs::get_root_folder (public) oacs_dav::register_folder oacs_dav::register_folder (public) fs::after_mount fs::after_mount fs::after_mount->apm_package_installed_p fs::after_mount->fs::get_root_folder fs::after_mount->oacs_dav::register_folder

Testcases:
No testcase defined.

fs::before_unmount (private)

 fs::before_unmount -package_id package_id -node_id node_id

Unregister the root WebDAV folder mapping before unmounting a file storage package instance.

Switches:
-package_id (required)
-node_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 apm_package_installed_p apm_package_installed_p (public) fs::get_root_folder fs::get_root_folder (public) oacs_dav::unregister_folder oacs_dav::unregister_folder (public) fs::before_unmount fs::before_unmount fs::before_unmount->apm_package_installed_p fs::before_unmount->fs::get_root_folder fs::before_unmount->oacs_dav::unregister_folder

Testcases:
No testcase defined.

fs::category_links (private)

 fs::category_links -object_id object_id -folder_id folder_id \
    [ -selected_category_id selected_category_id ] [ -fs_url fs_url ] \
    [ -joinwith joinwith ]
Switches:
-object_id (required)
the file storage object_id whose category list we creating
-folder_id (required)
the folder the category link should shearch on
-selected_category_id (optional)
the category that has been selected and for which a link to return to the folder without that category limitation should exist
-fs_url (optional)
is the file storage url for which these links will be created - defaults to the current package_url
-joinwith (optional, defaults to ", ")
allows you to join the link list with something other than the default ", "
Returns:
a list of category_links to filter the supplied folder for a given category

Partial Call Graph (max 5 caller/called nodes):
%3 packages/file-storage/www/file.tcl packages/file-storage/ www/file.tcl fs::category_links fs::category_links packages/file-storage/www/file.tcl->fs::category_links packages/file-storage/www/folder-chunk.tcl packages/file-storage/ www/folder-chunk.tcl packages/file-storage/www/folder-chunk.tcl->fs::category_links packages/file-storage/www/simple.tcl packages/file-storage/ www/simple.tcl packages/file-storage/www/simple.tcl->fs::category_links ad_conn ad_conn (public) fs::category_links->ad_conn category::get_mapped_categories category::get_mapped_categories (public) fs::category_links->category::get_mapped_categories category::get_name category::get_name (public) fs::category_links->category::get_name export_vars export_vars (public) fs::category_links->export_vars

Testcases:
No testcase defined.

fs::delete_file (public)

 fs::delete_file -item_id item_id [ -parent_id parent_id ] \
    [ -no_callback ]

Deletes a file and all its revisions. 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:
-item_id (required)
-parent_id (optional)
-no_callback (optional, boolean)

Partial Call Graph (max 5 caller/called nodes):
%3 test_fs_add_delete_copy fs_add_delete_copy (test file-storage) fs::delete_file fs::delete_file test_fs_add_delete_copy->fs::delete_file test_fs_add_file_to_folder fs_add_file_to_folder (test file-storage) test_fs_add_file_to_folder->fs::delete_file ad_conn ad_conn (public) fs::delete_file->ad_conn callback callback (public) fs::delete_file->callback db_exec_plsql db_exec_plsql (public) fs::delete_file->db_exec_plsql db_list db_list (public) fs::delete_file->db_list fs::do_notifications fs::do_notifications (public) fs::delete_file->fs::do_notifications fs::delete_version fs::delete_version (public) fs::delete_version->fs::delete_file packages/attachments/www/detach.tcl packages/attachments/ www/detach.tcl packages/attachments/www/detach.tcl->fs::delete_file packages/file-storage/www/delete.tcl packages/file-storage/ www/delete.tcl packages/file-storage/www/delete.tcl->fs::delete_file packages/file-storage/www/move.tcl packages/file-storage/ www/move.tcl packages/file-storage/www/move.tcl->fs::delete_file packages/file-storage/www/simple-delete.tcl packages/file-storage/ www/simple-delete.tcl packages/file-storage/www/simple-delete.tcl->fs::delete_file

Testcases:
fs_add_delete_copy, fs_add_file_to_folder

fs::delete_folder (public)

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

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

fs::delete_version (public)

 fs::delete_version -item_id item_id -version_id version_id

Deletes a revision. If it was the last revision, it deletes the file as well. 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:
-item_id (required)
-version_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 test_fs_add_delete_copy fs_add_delete_copy (test file-storage) fs::delete_version fs::delete_version test_fs_add_delete_copy->fs::delete_version db_exec_plsql db_exec_plsql (public) fs::delete_version->db_exec_plsql fs::delete_file fs::delete_file (public) fs::delete_version->fs::delete_file packages/file-storage/www/version-delete.tcl packages/file-storage/ www/version-delete.tcl packages/file-storage/www/version-delete.tcl->fs::delete_version

Testcases:
fs_add_delete_copy

fs::do_notifications (public)

 fs::do_notifications -folder_id folder_id -filename filename \
    -item_id item_id [ -package_id package_id ] -action action

Send notifications for file-storage operations. Note that not all possible operations are implemented, e.g. move, copy etc. See documentation.

Switches:
-folder_id (required)
-filename (required)
-item_id (required)
-package_id (optional)
-action (required)
The kind of operation. One of: new_file, new_version, new_url, delete_file, delete_url, delete_folder

Partial Call Graph (max 5 caller/called nodes):
%3 test_fs_add_file_to_folder fs_add_file_to_folder (test file-storage) fs::do_notifications fs::do_notifications test_fs_add_file_to_folder->fs::do_notifications _ _ (public) fs::do_notifications->_ acs_object::get_element acs_object::get_element (public) fs::do_notifications->acs_object::get_element ad_html_text_convert ad_html_text_convert (public) fs::do_notifications->ad_html_text_convert ad_url ad_url (public) fs::do_notifications->ad_url db_0or1row db_0or1row (public) fs::do_notifications->db_0or1row fs::add_created_file fs::add_created_file (public, deprecated) fs::add_created_file->fs::do_notifications fs::add_created_version fs::add_created_version (public, deprecated) fs::add_created_version->fs::do_notifications fs::add_file fs::add_file (public) fs::add_file->fs::do_notifications fs::add_version fs::add_version (public) fs::add_version->fs::do_notifications fs::delete_file fs::delete_file (public) fs::delete_file->fs::do_notifications

Testcases:
fs_add_file_to_folder

fs::file_copy (public)

 fs::file_copy -file_id file_id -target_folder_id target_folder_id \
    [ -postfix postfix ] [ -symlink ]

copy file to target folder

Switches:
-file_id (required)
Item_id of the file to be copied
-target_folder_id (required)
Folder ID of the folder to which the file is copied to
-postfix (optional)
Postfix will be added with "_" to the new filename (not title). Very useful if you want to avoid unique name constraints on cr_items.
-symlink (optional, boolean)
Defines if, instead of a full item, we should just add a symlink.

Partial Call Graph (max 5 caller/called nodes):
%3 test_fs_add_delete_copy fs_add_delete_copy (test file-storage) fs::file_copy fs::file_copy test_fs_add_delete_copy->fs::file_copy ad_conn ad_conn (public) fs::file_copy->ad_conn ad_file ad_file (public) fs::file_copy->ad_file content::item::get_id_by_name content::item::get_id_by_name (public) fs::file_copy->content::item::get_id_by_name content::item::new content::item::new (public) fs::file_copy->content::item::new content::item::set_live_revision content::item::set_live_revision (public) fs::file_copy->content::item::set_live_revision

Testcases:
fs_add_delete_copy

fs::folder_p (public)

 fs::folder_p -object_id object_id

Is this object a folder?

Switches:
-object_id (required)
Returns:
true if object_id is a folder

Partial Call Graph (max 5 caller/called nodes):
%3 test_fs_create_folder_using_api fs_create_folder_using_api (test file-storage) fs::folder_p fs::folder_p test_fs_create_folder_using_api->fs::folder_p db_string db_string (public) fs::folder_p->db_string

Testcases:
fs_create_folder_using_api

fs::get_archive_command (public, deprecated)

 fs::get_archive_command [ -in_file in_file ] [ -out_file out_file ]
Deprecated. Invoking this procedure generates a warning.

return the archive command after replacing {in_file} and {out_file} with their respective values.

Switches:
-in_file (optional)
-out_file (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 ad_conn ad_conn (public) ad_log_deprecated ad_log_deprecated (public) parameter::get parameter::get (public) fs::get_archive_command fs::get_archive_command fs::get_archive_command->ad_conn fs::get_archive_command->ad_log_deprecated fs::get_archive_command->parameter::get

Testcases:
No testcase defined.

fs::get_archive_extension (public, deprecated)

 fs::get_archive_extension
Deprecated. Invoking this procedure generates a warning.

return the archive extension that should be added to the output file of an archive command DEPRECATED: this is a trivial wrapper over the parameter api

See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 ad_log_deprecated ad_log_deprecated (public) parameter::get parameter::get (public) fs::get_archive_extension fs::get_archive_extension fs::get_archive_extension->ad_log_deprecated fs::get_archive_extension->parameter::get

Testcases:
No testcase defined.

fs::get_file_package_id (public)

 fs::get_file_package_id -file_id file_id

Returns the package_id for a passed-in file_id. This is useful when using symlinks to files whose real root_folder_id is not the root_folder_id of the package the user is in.

Switches:
-file_id (required)
Returns:
package_id
Author:
Stan Kaufman <skaufman@epimetrics.com>
Created:
2005-09-07

Partial Call Graph (max 5 caller/called nodes):
%3 test_fs_publish_file fs_publish_file (test file-storage) fs::get_file_package_id fs::get_file_package_id test_fs_publish_file->fs::get_file_package_id db_string db_string (public) fs::get_file_package_id->db_string packages/file-storage/www/download-zip.tcl packages/file-storage/ www/download-zip.tcl packages/file-storage/www/download-zip.tcl->fs::get_file_package_id

Testcases:
fs_publish_file

fs::get_file_system_safe_object_name (public)

 fs::get_file_system_safe_object_name -object_id object_id

get the name of a file storage object and make it safe for writing to the filesystem

Switches:
-object_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 test_fs_add_delete_copy fs_add_delete_copy (test file-storage) fs::get_file_system_safe_object_name fs::get_file_system_safe_object_name test_fs_add_delete_copy->fs::get_file_system_safe_object_name ad_sanitize_filename ad_sanitize_filename (public) fs::get_file_system_safe_object_name->ad_sanitize_filename fs::get_object_name fs::get_object_name (public) fs::get_file_system_safe_object_name->fs::get_object_name packages/file-storage/www/download-zip.tcl packages/file-storage/ www/download-zip.tcl packages/file-storage/www/download-zip.tcl->fs::get_file_system_safe_object_name

Testcases:
fs_add_delete_copy

fs::get_folder (public)

 fs::get_folder -name name -parent_id parent_id

Retrieve the folder_id of a folder given its name and parent folder.

Switches:
-name (required)
Internal name of the folder, must be unique under a given parent_id
-parent_id (required)
The parent folder to look under
Returns:
folder_id of the folder, or null if no folder was found by that name

Partial Call Graph (max 5 caller/called nodes):
%3 test_fs_create_folder_using_api fs_create_folder_using_api (test file-storage) fs::get_folder fs::get_folder test_fs_create_folder_using_api->fs::get_folder db_string db_string (public) fs::get_folder->db_string packages/file-storage/lib/recent.tcl packages/file-storage/ lib/recent.tcl packages/file-storage/lib/recent.tcl->fs::get_folder

Testcases:
fs_create_folder_using_api

fs::get_folder_contents (public, deprecated)

 fs::get_folder_contents [ -folder_id folder_id ] [ -user_id user_id ] \
    [ -n_past_days n_past_days ]
Deprecated. Invoking this procedure generates a warning.

WARNING: This proc is not scalable because it does too many permission checks. DRB: Not so true now that permissions are fast. However, it is now only used to clone files in dotLRN and for the somewhat brain-damaged syllabus package. At minimum the permission checks returned by the code can be removed. Most of the other fields as well. Oh well ... REMOVE WHEN SYLLABUS IS REWRITTEN TO FIND ITS FILE INTELLIGENTLY Retrieve the contents of the specified folder in the form of a list of ns_sets, one for each row returned. The keys for each row are as follows: object_id, name, live_revision, type, last_modified, new_p, content_size, file_upload_name write_p, delete_p, admin_p, DEPRECATED: this proc has been evidently the subject of controversy over the years. To this day (2023-03-17) no package seems to be using it. One can either query the database directly or use other existing apis to retrieve the folder children and then fetch the needed metadata via other means.

Switches:
-folder_id (optional)
The folder for which to retrieve contents
-user_id (optional)
The viewer of the contents (to make sure they have permission)
-n_past_days (optional, defaults to "99999")
Mark files that are newer than the past N days as new
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 acs_magic_object acs_magic_object (public) ad_conn ad_conn (public) ad_log_deprecated ad_log_deprecated (public) db_list_of_ns_sets db_list_of_ns_sets (public) fs::get_root_folder fs::get_root_folder (public) fs::get_folder_contents fs::get_folder_contents fs::get_folder_contents->acs_magic_object fs::get_folder_contents->ad_conn fs::get_folder_contents->ad_log_deprecated fs::get_folder_contents->db_list_of_ns_sets fs::get_folder_contents->fs::get_root_folder

Testcases:
No testcase defined.

fs::get_folder_contents_count (public)

 fs::get_folder_contents_count [ -folder_id folder_id ] \
    [ -user_id user_id ]

Retrieve the count of contents of the specified folder.

Switches:
-folder_id (optional)
The folder for which to retrieve contents
-user_id (optional)
DEPRECATED since commit 2002-02-22 by Yonatan Feldman (yon@milliped.com) this parameter doesn't have any effect. It was used to count only items where user had read permission, but was considered unscalable.

Partial Call Graph (max 5 caller/called nodes):
%3 test_fs_add_file_to_folder fs_add_file_to_folder (test file-storage) fs::get_folder_contents_count fs::get_folder_contents_count test_fs_add_file_to_folder->fs::get_folder_contents_count ad_conn ad_conn (public) fs::get_folder_contents_count->ad_conn db_string db_string (public) fs::get_folder_contents_count->db_string fs::get_root_folder fs::get_root_folder (public) fs::get_folder_contents_count->fs::get_root_folder packages/attachments/www/attach.tcl packages/attachments/ www/attach.tcl packages/attachments/www/attach.tcl->fs::get_folder_contents_count packages/file-storage/www/folder-delete.tcl packages/file-storage/ www/folder-delete.tcl packages/file-storage/www/folder-delete.tcl->fs::get_folder_contents_count packages/file-storage/www/index.tcl packages/file-storage/ www/index.tcl packages/file-storage/www/index.tcl->fs::get_folder_contents_count

Testcases:
fs_add_file_to_folder

fs::get_folder_objects (public)

 fs::get_folder_objects -folder_id folder_id -user_id user_id

Return a list the object_ids contained by a file storage folder.

Switches:
-folder_id (required)
The folder for which to retrieve contents
-user_id (required)
The viewer of the contents (to make sure they have permission)

Partial Call Graph (max 5 caller/called nodes):
%3 test_fs_publish_file fs_publish_file (test file-storage) fs::get_folder_objects fs::get_folder_objects test_fs_publish_file->fs::get_folder_objects db_list db_list (public) fs::get_folder_objects->db_list

Testcases:
fs_publish_file

fs::get_folder_package_and_root (public)

 fs::get_folder_package_and_root folder_id

Returns a two-element Tcl list containing the package_id and root_folder_id for the passed-in folder_id.

Parameters:
folder_id (required)
Author:
Andrew Grumet <aegrumet@alum.mit.edu>
Created:
15 March 2004

Partial Call Graph (max 5 caller/called nodes):
%3 test_fs_add_file_to_folder fs_add_file_to_folder (test file-storage) fs::get_folder_package_and_root fs::get_folder_package_and_root test_fs_add_file_to_folder->fs::get_folder_package_and_root db_1row db_1row (public) fs::get_folder_package_and_root->db_1row fs::add_created_version fs::add_created_version (public, deprecated) fs::add_created_version->fs::get_folder_package_and_root fs::add_version fs::add_version (public) fs::add_version->fs::get_folder_package_and_root fs::delete_file fs::delete_file (public) fs::delete_file->fs::get_folder_package_and_root fs::do_notifications fs::do_notifications (public) fs::do_notifications->fs::get_folder_package_and_root fs::notification::get_url fs::notification::get_url (private) fs::notification::get_url->fs::get_folder_package_and_root

Testcases:
fs_add_file_to_folder

fs::get_item_id (public)

 fs::get_item_id -name name [ -folder_id folder_id ]

Get the item_id of a file

Switches:
-name (required)
-folder_id (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 test_fs_add_file_to_folder fs_add_file_to_folder (test file-storage) fs::get_item_id fs::get_item_id test_fs_add_file_to_folder->fs::get_item_id ad_conn ad_conn (public) fs::get_item_id->ad_conn content::item::get_id content::item::get_id (public) fs::get_item_id->content::item::get_id fs_get_root_folder fs_get_root_folder (public) fs::get_item_id->fs_get_root_folder packages/acs-templating/www/scripts/xinha/file-selector.tcl packages/acs-templating/ www/scripts/xinha/file-selector.tcl packages/acs-templating/www/scripts/xinha/file-selector.tcl->fs::get_item_id packages/file-storage/www/file-add.tcl packages/file-storage/ www/file-add.tcl packages/file-storage/www/file-add.tcl->fs::get_item_id packages/file-storage/www/folder-add.tcl packages/file-storage/ www/folder-add.tcl packages/file-storage/www/folder-add.tcl->fs::get_item_id packages/file-storage/www/folder-zip-add.tcl packages/file-storage/ www/folder-zip-add.tcl packages/file-storage/www/folder-zip-add.tcl->fs::get_item_id packages/xowiki/www/xinha/file-selector.tcl packages/xowiki/ www/xinha/file-selector.tcl packages/xowiki/www/xinha/file-selector.tcl->fs::get_item_id

Testcases:
fs_add_file_to_folder

fs::get_object_info (public)

 fs::get_object_info -file_id file_id [ -revision_id revision_id ]

Returns an array containing the fs object info.

Switches:
-file_id (required)
Id of the file
-revision_id (optional)
Id of the revision
Returns:
Error:
Author:
Deds Castillo <deds@i-manila.com.ph>
Created:
2004-07-03

Partial Call Graph (max 5 caller/called nodes):
%3 test_fs_add_delete_copy fs_add_delete_copy (test file-storage) fs::get_object_info fs::get_object_info test_fs_add_delete_copy->fs::get_object_info content::item::get_live_revision content::item::get_live_revision (public) fs::get_object_info->content::item::get_live_revision content::revision::get_cr_file_path content::revision::get_cr_file_path (public) fs::get_object_info->content::revision::get_cr_file_path db_1row db_1row (public) fs::get_object_info->db_1row

Testcases:
fs_add_delete_copy

fs::get_object_name (public)

 fs::get_object_name -object_id object_id

Select the name of this object.

Switches:
-object_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 test_fs_add_delete_copy fs_add_delete_copy (test file-storage) fs::get_object_name fs::get_object_name test_fs_add_delete_copy->fs::get_object_name test_fs_add_file_to_folder fs_add_file_to_folder (test file-storage) test_fs_add_file_to_folder->fs::get_object_name db_string db_string (public) fs::get_object_name->db_string fs::delete_file fs::delete_file (public) fs::delete_file->fs::get_object_name fs::delete_folder fs::delete_folder (public) fs::delete_folder->fs::get_object_name fs::get_file_system_safe_object_name fs::get_file_system_safe_object_name (public) fs::get_file_system_safe_object_name->fs::get_object_name fs::publish_folder_to_file_system fs::publish_folder_to_file_system (public) fs::publish_folder_to_file_system->fs::get_object_name packages/acs-templating/www/scripts/xinha/file-selector.tcl packages/acs-templating/ www/scripts/xinha/file-selector.tcl packages/acs-templating/www/scripts/xinha/file-selector.tcl->fs::get_object_name

Testcases:
fs_add_delete_copy, fs_add_file_to_folder

fs::get_object_prettyname (public)

 fs::get_object_prettyname -object_id object_id

Select a pretty name for this object. If title is empty, returns name.

Switches:
-object_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 test_fs_add_delete_copy fs_add_delete_copy (test file-storage) fs::get_object_prettyname fs::get_object_prettyname test_fs_add_delete_copy->fs::get_object_prettyname db_string db_string (public) fs::get_object_prettyname->db_string

Testcases:
fs_add_delete_copy

fs::get_parent (public)

 fs::get_parent -item_id item_id

Get the parent of a given item.

Switches:
-item_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 test_fs_add_file_to_folder fs_add_file_to_folder (test file-storage) fs::get_parent fs::get_parent test_fs_add_file_to_folder->fs::get_parent db_string db_string (public) fs::get_parent->db_string fs::add_created_version fs::add_created_version (public, deprecated) fs::add_created_version->fs::get_parent fs::delete_file fs::delete_file (public) fs::delete_file->fs::get_parent fs::delete_folder fs::delete_folder (public) fs::delete_folder->fs::get_parent packages/acs-templating/www/scripts/xinha/file-selector.tcl packages/acs-templating/ www/scripts/xinha/file-selector.tcl packages/acs-templating/www/scripts/xinha/file-selector.tcl->fs::get_parent packages/file-storage/www/download-zip.tcl packages/file-storage/ www/download-zip.tcl packages/file-storage/www/download-zip.tcl->fs::get_parent

Testcases:
fs_add_file_to_folder

fs::get_root_folder (public)

 fs::get_root_folder [ -package_id package_id ]

Get the root folder of a package instance.

Switches:
-package_id (optional)
Package instance of the root folder to retrieve
Returns:
folder_id of the root folder retrieved

Partial Call Graph (max 5 caller/called nodes):
%3 test_fs_add_file_to_folder fs_add_file_to_folder (test file-storage) fs::get_root_folder fs::get_root_folder test_fs_add_file_to_folder->fs::get_root_folder test_fs_create_folder_using_api fs_create_folder_using_api (test file-storage) test_fs_create_folder_using_api->fs::get_root_folder ad_conn ad_conn (public) fs::get_root_folder->ad_conn db_exec_plsql db_exec_plsql (public) fs::get_root_folder->db_exec_plsql callback::pm::project_new::impl::file_storage callback::pm::project_new::impl::file_storage (private) callback::pm::project_new::impl::file_storage->fs::get_root_folder fs::after_mount fs::after_mount (private) fs::after_mount->fs::get_root_folder fs::before_unmount fs::before_unmount (private) fs::before_unmount->fs::get_root_folder fs::get_folder_contents fs::get_folder_contents (public, deprecated) fs::get_folder_contents->fs::get_root_folder fs::get_folder_contents_count fs::get_folder_contents_count (public) fs::get_folder_contents_count->fs::get_root_folder

Testcases:
fs_create_folder_using_api, fs_add_file_to_folder

fs::item_editable_info (public, deprecated)

 fs::item_editable_info -item_id item_id
Deprecated. Invoking this procedure generates a warning.

Returns an array containing elements editable_p, mime_type, file_extension if an fs item is editable through the browser, editable_p is set to 1 DEPRECATED: it is unclear what editable is supposed to mean. As of 2023-03-16 file-storage does not offer inline editing and no package, including file-storage itself, appears to be using this api.

Switches:
-item_id (required)
Returns:
Error:
Author:
Deds Castillo <deds@i-manila.com.ph>
Created:
2004-07-03
See Also:
  • nothing

Partial Call Graph (max 5 caller/called nodes):
%3 fs::item_editable_p fs::item_editable_p (public, deprecated) fs::item_editable_info fs::item_editable_info fs::item_editable_p->fs::item_editable_info ad_log_deprecated ad_log_deprecated (public) fs::item_editable_info->ad_log_deprecated content::item::get content::item::get (public) fs::item_editable_info->content::item::get db_string db_string (public) fs::item_editable_info->db_string

Testcases:
No testcase defined.

fs::item_editable_p (public, deprecated)

 fs::item_editable_p -item_id item_id
Deprecated. Invoking this procedure generates a warning.

returns 1 if item is editable via browser DEPRECATED: it is unclear what editable is supposed to mean. As of 2023-03-16 file-storage does not offer inline editing and no package, including file-storage itself, appears to be using this api.

Switches:
-item_id (required)
Returns:
Error:
Author:
Deds Castillo <deds@i-manila.com.ph>
Created:
2004-07-03
See Also:
  • nothing

Partial Call Graph (max 5 caller/called nodes):
%3 ad_log_deprecated ad_log_deprecated (public) fs::item_editable_info fs::item_editable_info (public, deprecated) fs::item_editable_p fs::item_editable_p fs::item_editable_p->ad_log_deprecated fs::item_editable_p->fs::item_editable_info

Testcases:
No testcase defined.

fs::max_upload_size (public)

 fs::max_upload_size [ -package_id package_id ]
Switches:
-package_id (optional)
id of the file-storage package instance. Will default to the connection package_id if not specified. Returns the maximum upload size for this file-storage instance. If the value from the parameter is empty, invalid, or bigger than the server-wide upload limit, the latter will take over.
Returns:
numeric value in bytes

Partial Call Graph (max 5 caller/called nodes):
%3 test_fs_add_file_to_folder fs_add_file_to_folder (test file-storage) fs::max_upload_size fs::max_upload_size test_fs_add_file_to_folder->fs::max_upload_size fs::unit_conv fs::unit_conv (private) fs::max_upload_size->fs::unit_conv parameter::get parameter::get (public) fs::max_upload_size->parameter::get packages/attachments/www/file-add-2.tcl packages/attachments/ www/file-add-2.tcl packages/attachments/www/file-add-2.tcl->fs::max_upload_size packages/file-storage/www/admin/upload-size-limit.tcl packages/file-storage/ www/admin/upload-size-limit.tcl packages/file-storage/www/admin/upload-size-limit.tcl->fs::max_upload_size packages/file-storage/www/file-add.tcl packages/file-storage/ www/file-add.tcl packages/file-storage/www/file-add.tcl->fs::max_upload_size packages/file-storage/www/folder-zip-add.tcl packages/file-storage/ www/folder-zip-add.tcl packages/file-storage/www/folder-zip-add.tcl->fs::max_upload_size

Testcases:
fs_add_file_to_folder

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 ]

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):
%3 test_fs_add_delete_copy fs_add_delete_copy (test file-storage) fs::new_folder fs::new_folder test_fs_add_delete_copy->fs::new_folder test_fs_add_file_to_folder fs_add_file_to_folder (test file-storage) test_fs_add_file_to_folder->fs::new_folder test_fs_create_folder_using_api fs_create_folder_using_api (test file-storage) test_fs_create_folder_using_api->fs::new_folder test_fs_publish_file fs_publish_file (test file-storage) test_fs_publish_file->fs::new_folder acs_object::package_id acs_object::package_id (public) fs::new_folder->acs_object::package_id ad_conn ad_conn (public) fs::new_folder->ad_conn apm_package_key_from_id apm_package_key_from_id (public) fs::new_folder->apm_package_key_from_id callback callback (public) fs::new_folder->callback content::folder::new content::folder::new (public) fs::new_folder->content::folder::new callback::pm::project_new::impl::file_storage callback::pm::project_new::impl::file_storage (private) callback::pm::project_new::impl::file_storage->fs::new_folder fs::impl::fs_object::mkcol fs::impl::fs_object::mkcol (private) fs::impl::fs_object::mkcol->fs::new_folder install::xml::action::file-storage-folder install::xml::action::file-storage-folder (private) install::xml::action::file-storage-folder->fs::new_folder packages/file-storage/www/folder-create.tcl packages/file-storage/ www/folder-create.tcl packages/file-storage/www/folder-create.tcl->fs::new_folder

Testcases:
fs_publish_file, fs_add_delete_copy, fs_create_folder_using_api, fs_add_file_to_folder

fs::new_root_folder (public)

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

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

fs::notification::get_url (private)

 fs::notification::get_url object_id

This proc implements the GetURL operation of the NotificationType Service Contract and should not be invoked directly.

Parameters:
object_id (required)
Returns:
a full URL to the object_id. Handles folders.
Author:
Stan Kaufman <skaufman@epimetrics.com>
Created:
2005-02-28

Partial Call Graph (max 5 caller/called nodes):
%3 AcsSc.notificationtype.geturl.fs_fs_notif_type AcsSc.notificationtype.geturl.fs_fs_notif_type (private) fs::notification::get_url fs::notification::get_url AcsSc.notificationtype.geturl.fs_fs_notif_type->fs::notification::get_url ad_url ad_url (public) fs::notification::get_url->ad_url fs::get_folder_package_and_root fs::get_folder_package_and_root (public) fs::notification::get_url->fs::get_folder_package_and_root site_node::get_url_from_object_id site_node::get_url_from_object_id (public) fs::notification::get_url->site_node::get_url_from_object_id

Testcases:
No testcase defined.

fs::object_p (public)

 fs::object_p -object_id object_id

is this a file storage object

Switches:
-object_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 test_fs_add_delete_copy fs_add_delete_copy (test file-storage) fs::object_p fs::object_p test_fs_add_delete_copy->fs::object_p db_string db_string (public) fs::object_p->db_string

Testcases:
fs_add_delete_copy

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 ]

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):
%3 test_fs_publish_file fs_publish_file (test file-storage) fs::publish_folder_to_file_system fs::publish_folder_to_file_system test_fs_publish_file->fs::publish_folder_to_file_system ad_file ad_file (public) fs::publish_folder_to_file_system->ad_file ad_sanitize_filename ad_sanitize_filename (public) fs::publish_folder_to_file_system->ad_sanitize_filename ad_tmpnam ad_tmpnam (public) fs::publish_folder_to_file_system->ad_tmpnam db_foreach db_foreach (public) fs::publish_folder_to_file_system->db_foreach fs::get_object_name fs::get_object_name (public) fs::publish_folder_to_file_system->fs::get_object_name fs::publish_object_to_file_system fs::publish_object_to_file_system (public) fs::publish_object_to_file_system->fs::publish_folder_to_file_system

Testcases:
fs_publish_file

fs::publish_object_to_file_system (public)

 fs::publish_object_to_file_system -object_id object_id [ -path path ] \
    [ -file_name file_name ] [ -user_id user_id ]

publish a file storage object to the filesystem

Switches:
-object_id (required)
-path (optional)
-file_name (optional)
-user_id (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 test_fs_publish_file fs_publish_file (test file-storage) fs::publish_object_to_file_system fs::publish_object_to_file_system test_fs_publish_file->fs::publish_object_to_file_system ad_mktmpdir ad_mktmpdir (public) fs::publish_object_to_file_system->ad_mktmpdir content::symlink::resolve content::symlink::resolve (public) fs::publish_object_to_file_system->content::symlink::resolve db_1row db_1row (public) fs::publish_object_to_file_system->db_1row fs::publish_url_to_file_system fs::publish_url_to_file_system (public) fs::publish_object_to_file_system->fs::publish_url_to_file_system fs::publish_versioned_object_to_file_system fs::publish_versioned_object_to_file_system (public) fs::publish_object_to_file_system->fs::publish_versioned_object_to_file_system fs::publish_folder_to_file_system fs::publish_folder_to_file_system (public) fs::publish_folder_to_file_system->fs::publish_object_to_file_system packages/file-storage/www/download-zip.tcl packages/file-storage/ www/download-zip.tcl packages/file-storage/www/download-zip.tcl->fs::publish_object_to_file_system

Testcases:
fs_publish_file

fs::publish_url_to_file_system (public)

 fs::publish_url_to_file_system -object_id object_id [ -path path ] \
    [ -file_name file_name ]

publish a URL object to the filesystem as a Windows shortcut (which at least KDE also knows how to handle)

Switches:
-object_id (required)
-path (optional)
-file_name (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 test_fs_publish_file fs_publish_file (test file-storage) fs::publish_url_to_file_system fs::publish_url_to_file_system test_fs_publish_file->fs::publish_url_to_file_system ad_file ad_file (public) fs::publish_url_to_file_system->ad_file ad_mktmpdir ad_mktmpdir (public) fs::publish_url_to_file_system->ad_mktmpdir ad_sanitize_filename ad_sanitize_filename (public) fs::publish_url_to_file_system->ad_sanitize_filename db_1row db_1row (public) fs::publish_url_to_file_system->db_1row fs::publish_object_to_file_system fs::publish_object_to_file_system (public) fs::publish_object_to_file_system->fs::publish_url_to_file_system

Testcases:
fs_publish_file

fs::publish_versioned_object_to_file_system (public)

 fs::publish_versioned_object_to_file_system -object_id object_id \
    [ -path path ] [ -file_name file_name ]

publish an object to the filesystem

Switches:
-object_id (required)
-path (optional)
-file_name (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 test_fs_publish_file fs_publish_file (test file-storage) fs::publish_versioned_object_to_file_system fs::publish_versioned_object_to_file_system test_fs_publish_file->fs::publish_versioned_object_to_file_system ad_file ad_file (public) fs::publish_versioned_object_to_file_system->ad_file ad_mktmpdir ad_mktmpdir (public) fs::publish_versioned_object_to_file_system->ad_mktmpdir ad_sanitize_filename ad_sanitize_filename (public) fs::publish_versioned_object_to_file_system->ad_sanitize_filename content::item::get content::item::get (public) fs::publish_versioned_object_to_file_system->content::item::get content::revision::export_to_filesystem content::revision::export_to_filesystem (public) fs::publish_versioned_object_to_file_system->content::revision::export_to_filesystem fs::publish_object_to_file_system fs::publish_object_to_file_system (public) fs::publish_object_to_file_system->fs::publish_versioned_object_to_file_system

Testcases:
fs_publish_file

fs::remove_special_file_system_characters (public, deprecated)

 fs::remove_special_file_system_characters -string string
Deprecated. Invoking this procedure generates a warning.

Remove unsafe filesystem characters. Useful if you want to use $string as the name of an object to write to disk.

Switches:
-string (required)
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 _ _ (public) ad_log_deprecated ad_log_deprecated (public) fs::remove_special_file_system_characters fs::remove_special_file_system_characters fs::remove_special_file_system_characters->_ fs::remove_special_file_system_characters->ad_log_deprecated

Testcases:
No testcase defined.

fs::rename_folder (public)

 fs::rename_folder -folder_id folder_id -name name [ -no_callback ]

rename the given folder

Switches:
-folder_id (required)
-name (required)
-no_callback (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::rename_folder fs::rename_folder test_fs_create_folder_using_api->fs::rename_folder ad_conn ad_conn (public) fs::rename_folder->ad_conn callback callback (public) fs::rename_folder->callback db_exec_plsql db_exec_plsql (public) fs::rename_folder->db_exec_plsql packages/file-storage/www/folder-create.tcl packages/file-storage/ www/folder-create.tcl packages/file-storage/www/folder-create.tcl->fs::rename_folder

Testcases:
fs_create_folder_using_api

fs::set_folder_description (public)

 fs::set_folder_description -folder_id folder_id \
    [ -description description ]

sets the description for the given folder in cr_folders. Perhaps this should be a CR proc?

Switches:
-folder_id (required)
-description (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 test_fs_add_delete_copy fs_add_delete_copy (test file-storage) fs::set_folder_description fs::set_folder_description test_fs_add_delete_copy->fs::set_folder_description db_dml db_dml (public) fs::set_folder_description->db_dml packages/file-storage/www/folder-create.tcl packages/file-storage/ www/folder-create.tcl packages/file-storage/www/folder-create.tcl->fs::set_folder_description

Testcases:
fs_add_delete_copy

fs::unit_conv (private)

 fs::unit_conv value

Convert units to value. This should done more generic, ... we have in NaviServer c-level support for this which should be used if available in the future.

Parameters:
value (required)

Partial Call Graph (max 5 caller/called nodes):
%3 fs::max_upload_size fs::max_upload_size (public) fs::unit_conv fs::unit_conv fs::max_upload_size->fs::unit_conv

Testcases:
No testcase defined.

fs::webdav_p (private)

 fs::webdav_p

Returns if webDAV is enabled.

Returns:
boolean

Partial Call Graph (max 5 caller/called nodes):
%3 fs::webdav_url fs::webdav_url (public) fs::webdav_p fs::webdav_p fs::webdav_url->fs::webdav_p packages/file-storage/www/index.tcl packages/file-storage/ www/index.tcl packages/file-storage/www/index.tcl->fs::webdav_p apm_package_installed_p apm_package_installed_p (public) fs::webdav_p->apm_package_installed_p parameter::get parameter::get (public) fs::webdav_p->parameter::get

Testcases:
No testcase defined.

fs::webdav_url (public)

 fs::webdav_url -item_id item_id [ -root_folder_id root_folder_id ] \
    [ -package_id package_id ]

Provide URL for webdav access to file or folder

Switches:
-item_id (required)
folder_id or item_id of file-storage folder or file
-root_folder_id (optional)
root folder to resolve URL from
-package_id (optional)
Returns:
fully qualified URL for WebDAV access or empty string if item is not WebDAV enabled

Partial Call Graph (max 5 caller/called nodes):
%3 test_fs_publish_file fs_publish_file (test file-storage) fs::webdav_url fs::webdav_url test_fs_publish_file->fs::webdav_url ad_conn ad_conn (public) fs::webdav_url->ad_conn ad_url ad_url (public) fs::webdav_url->ad_url apm_package_url_from_id apm_package_url_from_id (public) fs::webdav_url->apm_package_url_from_id content::item::get_virtual_path content::item::get_virtual_path (public) fs::webdav_url->content::item::get_virtual_path fs::get_root_folder fs::get_root_folder (public) fs::webdav_url->fs::get_root_folder packages/file-storage/www/index.tcl packages/file-storage/ www/index.tcl packages/file-storage/www/index.tcl->fs::webdav_url

Testcases:
fs_publish_file

fs_children_have_permission_p (private)

 fs_children_have_permission_p [ -user_id user_id ] item_id privilege

This procedure, given a content item and a privilege, checks to see if there are any children of the item on which the user does not have that privilege.

Switches:
-user_id (optional)
Parameters:
item_id (required)
privilege (required)
Returns:
0 if there is any child item on which the user does not have the privilege. It returns 1 if the user has the privilege on every child item.

Partial Call Graph (max 5 caller/called nodes):
%3 packages/file-storage/www/folder-delete.tcl packages/file-storage/ www/folder-delete.tcl fs_children_have_permission_p fs_children_have_permission_p packages/file-storage/www/folder-delete.tcl->fs_children_have_permission_p ad_conn ad_conn (public) fs_children_have_permission_p->ad_conn db_string db_string (public) fs_children_have_permission_p->db_string

Testcases:
No testcase defined.

fs_context_bar_list (public)

 fs_context_bar_list [ -root_folder_id root_folder_id ] \
    [ -final final ] [ -folder_url folder_url ] [ -file_url file_url ] \
    [ -extra_vars extra_vars ] item_id

Constructs the list to be fed to ad_context_bar appropriate for item_id. If -final is specified, that string will be the last item in the context bar. Otherwise, the name corresponding to item_id will be used.

Switches:
-root_folder_id (optional)
-final (optional)
-folder_url (optional, defaults to "index")
-file_url (optional, defaults to "file")
-extra_vars (optional)
Parameters:
item_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 test_attachments_url_api attachments_url_api (test attachments) fs_context_bar_list fs_context_bar_list test_attachments_url_api->fs_context_bar_list test_fs_add_file_to_folder fs_add_file_to_folder (test file-storage) test_fs_add_file_to_folder->fs_context_bar_list test_fs_create_folder fs_create_folder (test file-storage) test_fs_create_folder->fs_context_bar_list test_fs_edit_folder fs_edit_folder (test file-storage) test_fs_edit_folder->fs_context_bar_list db_exec_plsql db_exec_plsql (public) fs_context_bar_list->db_exec_plsql db_list_of_lists db_list_of_lists (public) fs_context_bar_list->db_list_of_lists db_string db_string (public) fs_context_bar_list->db_string fs_get_root_folder fs_get_root_folder (public) fs_context_bar_list->fs_get_root_folder attachments::context_bar attachments::context_bar (public) attachments::context_bar->fs_context_bar_list packages/file-storage/www/admin/rss-subscr-ae.tcl packages/file-storage/ www/admin/rss-subscr-ae.tcl packages/file-storage/www/admin/rss-subscr-ae.tcl->fs_context_bar_list packages/file-storage/www/admin/rss-subscrs.tcl packages/file-storage/ www/admin/rss-subscrs.tcl packages/file-storage/www/admin/rss-subscrs.tcl->fs_context_bar_list packages/file-storage/www/file-add.tcl packages/file-storage/ www/file-add.tcl packages/file-storage/www/file-add.tcl->fs_context_bar_list packages/file-storage/www/file-edit.tcl packages/file-storage/ www/file-edit.tcl packages/file-storage/www/file-edit.tcl->fs_context_bar_list

Testcases:
attachments_url_api, fs_create_folder, fs_edit_folder, fs_add_file_to_folder

fs_file_p (public)

 fs_file_p file_id

Returns 1 if the file_id corresponds to a file in the file-storage system. Returns 0 otherwise.

Parameters:
file_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 test_fs_add_delete_copy fs_add_delete_copy (test file-storage) fs_file_p fs_file_p test_fs_add_delete_copy->fs_file_p db_0or1row db_0or1row (public) fs_file_p->db_0or1row packages/file-storage/www/file-edit.tcl packages/file-storage/ www/file-edit.tcl packages/file-storage/www/file-edit.tcl->fs_file_p packages/file-storage/www/file.tcl packages/file-storage/ www/file.tcl packages/file-storage/www/file.tcl->fs_file_p packages/file-storage/www/permissions.tcl packages/file-storage/ www/permissions.tcl packages/file-storage/www/permissions.tcl->fs_file_p

Testcases:
fs_add_delete_copy

fs_folder_p (public)

 fs_folder_p folder_id

Returns 1 if the folder_id corresponds to a folder in the file-storage system. Returns 0 otherwise.

Parameters:
folder_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 test_fs_add_delete_copy fs_add_delete_copy (test file-storage) fs_folder_p fs_folder_p test_fs_add_delete_copy->fs_folder_p db_0or1row db_0or1row (public) fs_folder_p->db_0or1row packages/acs-templating/www/scripts/xinha/file-selector.tcl packages/acs-templating/ www/scripts/xinha/file-selector.tcl packages/acs-templating/www/scripts/xinha/file-selector.tcl->fs_folder_p packages/attachments/www/file-add-2.tcl packages/attachments/ www/file-add-2.tcl packages/attachments/www/file-add-2.tcl->fs_folder_p packages/attachments/www/file-add.tcl packages/attachments/ www/file-add.tcl packages/attachments/www/file-add.tcl->fs_folder_p packages/attachments/www/simple-add-2.tcl packages/attachments/ www/simple-add-2.tcl packages/attachments/www/simple-add-2.tcl->fs_folder_p packages/attachments/www/simple-add.tcl packages/attachments/ www/simple-add.tcl packages/attachments/www/simple-add.tcl->fs_folder_p

Testcases:
fs_add_delete_copy

fs_get_folder_name (public)

 fs_get_folder_name folder_id

Returns the name of a folder.

Parameters:
folder_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 test_fs_create_folder_using_api fs_create_folder_using_api (test file-storage) fs_get_folder_name fs_get_folder_name test_fs_create_folder_using_api->fs_get_folder_name db_string db_string (public) fs_get_folder_name->db_string fs::do_notifications fs::do_notifications (public) fs::do_notifications->fs_get_folder_name packages/file-storage/www/admin/rss-subscr-ae.tcl packages/file-storage/ www/admin/rss-subscr-ae.tcl packages/file-storage/www/admin/rss-subscr-ae.tcl->fs_get_folder_name packages/file-storage/www/admin/rss-subscrs.tcl packages/file-storage/ www/admin/rss-subscrs.tcl packages/file-storage/www/admin/rss-subscrs.tcl->fs_get_folder_name packages/file-storage/www/folder-delete.tcl packages/file-storage/ www/folder-delete.tcl packages/file-storage/www/folder-delete.tcl->fs_get_folder_name packages/file-storage/www/index.tcl packages/file-storage/ www/index.tcl packages/file-storage/www/index.tcl->fs_get_folder_name

Testcases:
fs_create_folder_using_api

fs_get_root_folder (public)

 fs_get_root_folder [ -package_id package_id ]

Returns the root folder for the file storage system.

Switches:
-package_id (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 test_fs_add_file_to_folder fs_add_file_to_folder (test file-storage) fs_get_root_folder fs_get_root_folder test_fs_add_file_to_folder->fs_get_root_folder test_fs_create_folder fs_create_folder (test file-storage) test_fs_create_folder->fs_get_root_folder test_fs_edit_folder fs_edit_folder (test file-storage) test_fs_edit_folder->fs_get_root_folder ad_conn ad_conn (public) fs_get_root_folder->ad_conn fs::get_root_folder fs::get_root_folder (public) fs_get_root_folder->fs::get_root_folder fs::get_item_id fs::get_item_id (public) fs::get_item_id->fs_get_root_folder fs_context_bar_list fs_context_bar_list (public) fs_context_bar_list->fs_get_root_folder packages/acs-templating/www/scripts/xinha/file-selector.tcl packages/acs-templating/ www/scripts/xinha/file-selector.tcl packages/acs-templating/www/scripts/xinha/file-selector.tcl->fs_get_root_folder packages/file-storage/www/admin/rss-subscr-ae.tcl packages/file-storage/ www/admin/rss-subscr-ae.tcl packages/file-storage/www/admin/rss-subscr-ae.tcl->fs_get_root_folder packages/file-storage/www/admin/rss-subscrs.tcl packages/file-storage/ www/admin/rss-subscrs.tcl packages/file-storage/www/admin/rss-subscrs.tcl->fs_get_root_folder

Testcases:
fs_create_folder, fs_edit_folder, fs_add_file_to_folder

fs_version_p (public)

 fs_version_p version_id

Returns 1 if the version_id corresponds to a version in the file-storage system. Returns 0 otherwise.

Parameters:
version_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 test_fs_add_delete_copy fs_add_delete_copy (test file-storage) fs_version_p fs_version_p test_fs_add_delete_copy->fs_version_p db_0or1row db_0or1row (public) fs_version_p->db_0or1row packages/file-storage/www/version-delete.tcl packages/file-storage/ www/version-delete.tcl packages/file-storage/www/version-delete.tcl->fs_version_p

Testcases:
fs_add_delete_copy
[ show source ]