• Publicity: Public Only All

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.27 2022/02/17 20:19:06 gustafn Exp $

Procedures in this file

Detailed information

fs::add_created_file (public)

 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 ]

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 (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

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

fs::add_created_version (public)

 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 ]

Create a new version of a file storage item using the content passed in content_body

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 (defaults to "f") (optional)
-storage_type (optional)
-package_id (optional)
-storage_type (optional)
Returns:
revision_id

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

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 (boolean) (optional)
-no_notification (boolean) (optional)
Returns:
revision_id

Partial Call Graph (max 5 caller/called nodes):
%3 test_fs_add_file_to_folder fs_add_file_to_folder (test file-storage) fs::add_file fs::add_file 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 fs::impl::fs_object::put fs::impl::fs_object::put (public) 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_file_to_folder

fs::add_version (public)

 fs::add_version -name name -tmp_filename tmp_filename \
    -package_id package_id [ -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 ] [ -mime_type mime_type ] \
    [ -no_callback ]

Create a new version of a file storage item

Switches:
-name (required)
-tmp_filename (required)
-package_id (required)
-item_id (optional)
-creation_user (optional)
-creation_ip (optional)
-title (optional)
-description (optional)
-suppress_notify_p (defaults to "f") (optional)
-storage_type (optional)
-mime_type (optional)
-no_callback (boolean) (optional)
Returns:
revision_id

Partial Call Graph (max 5 caller/called nodes):
%3 test_fs_add_file_to_folder fs_add_file_to_folder (test file-storage) fs::add_version fs::add_version test_fs_add_file_to_folder->fs::add_version fs::add_file fs::add_file (public) fs::add_file->fs::add_version fs::impl::fs_object::put fs::impl::fs_object::put (public) 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_file_to_folder

fs::delete_file (public)

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

Deletes a file and all its revisions

Switches:
-item_id (required)
-parent_id (optional)
-no_callback (boolean) (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::delete_file fs::delete_file test_fs_add_file_to_folder->fs::delete_file 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_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

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

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 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.

Switches:
-item_id (required)
-version_id (required)

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

Testcases:
No testcase defined.

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 fs::add_created_file fs::add_created_file (public) fs::add_created_file->fs::do_notifications fs::add_created_version fs::add_created_version (public) 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 (boolean) (optional)
Defines if, instead of a full item, we should just add a symlink.

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

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

Testcases:
fs_create_folder_using_api

fs::get_archive_command (public)

 fs::get_archive_command [ -in_file in_file ] [ -out_file out_file ]

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

Testcases:
No testcase defined.

fs::get_archive_extension (public)

 fs::get_archive_extension

return the archive extension that should be added to the output file of an archive command

Partial Call Graph (max 5 caller/called nodes):
%3

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 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 packages/file-storage/www/download-zip.tcl packages/file-storage/ www/download-zip.tcl fs::get_file_system_safe_object_name fs::get_file_system_safe_object_name packages/file-storage/www/download-zip.tcl->fs::get_file_system_safe_object_name

Testcases:
No testcase defined.

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 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)

 fs::get_folder_contents [ -folder_id folder_id ] [ -user_id user_id ] \
    [ -n_past_days n_past_days ]

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,

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 (defaults to "99999") (optional)
Mark files that are newer than the past N days as new

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

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 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

Testcases:
No testcase defined.

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
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 fs::add_created_version fs::add_created_version (public) 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 (public) 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 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

Testcases:
No testcase defined.

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_file_to_folder fs_add_file_to_folder (test file-storage) fs::get_object_name fs::get_object_name test_fs_add_file_to_folder->fs::get_object_name 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_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

Testcases:
No testcase defined.

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 fs::add_created_version fs::add_created_version (public) fs::add_created_version->fs::get_parent fs::add_version fs::add_version (public) fs::add_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

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 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) 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)

 fs::item_editable_info -item_id item_id

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

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

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

Testcases:
No testcase defined.

fs::item_editable_p (public)

 fs::item_editable_p -item_id item_id

returns 1 if item is editable via browser

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

Partial Call Graph (max 5 caller/called nodes):
%3

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 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 (boolean) (optional)
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_file_to_folder fs_add_file_to_folder (test file-storage) fs::new_folder fs::new_folder 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 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 (public) 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_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 fs::install::after_instantiate fs::install::after_instantiate (private) fs::new_root_folder fs::new_root_folder 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:
No testcase defined.

fs::notification::get_url (public)

 fs::notification::get_url object_id

returns a full url to the object_id. handles folders

Parameters:
object_id
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

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

Testcases:
No testcase defined.

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 fs::publish_object_to_file_system fs::publish_object_to_file_system (public) fs::publish_folder_to_file_system fs::publish_folder_to_file_system fs::publish_object_to_file_system->fs::publish_folder_to_file_system

Testcases:
No testcase defined.

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 fs::publish_folder_to_file_system fs::publish_folder_to_file_system (public) fs::publish_object_to_file_system fs::publish_object_to_file_system 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:
No testcase defined.

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 fs::publish_object_to_file_system fs::publish_object_to_file_system (public) fs::publish_url_to_file_system fs::publish_url_to_file_system fs::publish_object_to_file_system->fs::publish_url_to_file_system

Testcases:
No testcase defined.

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 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

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 (boolean) (optional)

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 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 packages/file-storage/www/folder-create.tcl packages/file-storage/ www/folder-create.tcl fs::set_folder_description fs::set_folder_description packages/file-storage/www/folder-create.tcl->fs::set_folder_description

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 packages/file-storage/www/index.tcl packages/file-storage/ www/index.tcl fs::webdav_url fs::webdav_url packages/file-storage/www/index.tcl->fs::webdav_url

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 (defaults to "index") (optional)
-file_url (defaults to "file") (optional)
-extra_vars (optional)
Parameters:
item_id

Partial Call Graph (max 5 caller/called nodes):
%3 test_fs_add_file_to_folder fs_add_file_to_folder (test file-storage) fs_context_bar_list fs_context_bar_list 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 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:
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

Partial Call Graph (max 5 caller/called nodes):
%3 packages/file-storage/www/file-edit.tcl packages/file-storage/ www/file-edit.tcl fs_file_p fs_file_p 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:
No testcase defined.

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

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-templating/www/scripts/xinha/file-selector.tcl packages/acs-templating/ www/scripts/xinha/file-selector.tcl fs_folder_p fs_folder_p 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:
No testcase defined.

fs_get_folder_name (public)

 fs_get_folder_name folder_id

Returns the name of a folder.

Parameters:
folder_id

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 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 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

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

Testcases:
No testcase defined.
[ show source ]