apm-file-procs.tcl

Functions that APM uses to interact with the filesystem and I/O.

Location:
packages/acs-tcl/tcl/apm-file-procs.tcl
Created:
Fri Oct 6 21:46:05 2000
Author:
Bryan Quinn <bquinn@arsdigita.com>
CVS Identification:
$Id: apm-file-procs.tcl,v 1.45.2.10 2022/07/13 09:54:32 antoniop Exp $

Procedures in this file

Detailed information

apm_cancel_all_watches (public)

 apm_cancel_all_watches package_key

Cancel all watches in the given package.

Parameters:
package_key - The package_key of the package to stop watching.
Author:
Peter Marklund

See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-admin/www/apm/package-watch-cancel.tcl packages/acs-admin/ www/apm/package-watch-cancel.tcl apm_cancel_all_watches apm_cancel_all_watches packages/acs-admin/www/apm/package-watch-cancel.tcl->apm_cancel_all_watches apm_file_watch_cancel apm_file_watch_cancel (public) apm_cancel_all_watches->apm_file_watch_cancel apm_get_watchable_files apm_get_watchable_files (private) apm_cancel_all_watches->apm_get_watchable_files

Testcases:
No testcase defined.

apm_dev_null (private)

 apm_dev_null
Returns:
null device

Partial Call Graph (max 5 caller/called nodes):
%3 apm_extract_tarball apm_extract_tarball (public) apm_dev_null apm_dev_null apm_extract_tarball->apm_dev_null apm_generate_tarball apm_generate_tarball (public) apm_generate_tarball->apm_dev_null apm_load_apm_file apm_load_apm_file (public) apm_load_apm_file->apm_dev_null

Testcases:
No testcase defined.

apm_extract_tarball (public)

 apm_extract_tarball version_id dir

Extracts a distribution tarball into a particular directory, overwriting any existing files. DCW - 2001-05-03, modified to extract tarball from content repository.

Parameters:
version_id
dir

Partial Call Graph (max 5 caller/called nodes):
%3 ad_tmpnam ad_tmpnam (public) apm_dev_null apm_dev_null (private) apm_gzip_cmd apm_gzip_cmd (public) apm_tar_cmd apm_tar_cmd (public) db_blob_get_file db_blob_get_file (public) apm_extract_tarball apm_extract_tarball apm_extract_tarball->ad_tmpnam apm_extract_tarball->apm_dev_null apm_extract_tarball->apm_gzip_cmd apm_extract_tarball->apm_tar_cmd apm_extract_tarball->db_blob_get_file

Testcases:
No testcase defined.

apm_file_type_keys (public)

 apm_file_type_keys

Returns a list of valid file type keys.

Author:
Peter Marklund

See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 apm_file_type_names apm_file_type_names (public) apm_file_type_keys apm_file_type_keys apm_file_type_keys->apm_file_type_names

Testcases:
No testcase defined.

apm_file_type_names (public)

 apm_file_type_names

Returns an array list with filetypes as keys and filetype pretty names as values.

Author:
Peter Marklund

Partial Call Graph (max 5 caller/called nodes):
%3 apm_file_type_keys apm_file_type_keys (public) apm_file_type_names apm_file_type_names apm_file_type_keys->apm_file_type_names apm_pretty_name_for_file_type apm_pretty_name_for_file_type (public) apm_pretty_name_for_file_type->apm_file_type_names

Testcases:
No testcase defined.

apm_file_watch (public)

 apm_file_watch path

Marks the file of the indicated path to be watched. If the file changes, it will be reloaded prior to the next page load.

Parameters:
path - The path of the file relative to server root

Partial Call Graph (max 5 caller/called nodes):
%3 apm_watch_all_files apm_watch_all_files (public) apm_file_watch apm_file_watch apm_watch_all_files->apm_file_watch packages/acs-admin/www/apm/file-watch.tcl packages/acs-admin/ www/apm/file-watch.tcl packages/acs-admin/www/apm/file-watch.tcl->apm_file_watch

Testcases:
No testcase defined.

apm_file_watch_cancel (public)

 apm_file_watch_cancel [ path ]

Stop watching a certain file, or all watched files if path is not specified. If the file is not watched this procedure does nothing.

Parameters:
path (optional) - The path relative to server root of the file to stop watching. Optional.
Author:
Peter Marklund

Partial Call Graph (max 5 caller/called nodes):
%3 apm_cancel_all_watches apm_cancel_all_watches (public) apm_file_watch_cancel apm_file_watch_cancel apm_cancel_all_watches->apm_file_watch_cancel packages/acs-admin/www/apm/file-watch-cancel.tcl packages/acs-admin/ www/apm/file-watch-cancel.tcl packages/acs-admin/www/apm/file-watch-cancel.tcl->apm_file_watch_cancel

Testcases:
No testcase defined.

apm_file_watchable_p (public)

 apm_file_watchable_p path

Given the path of a file determine if it is appropriate to be watched for reload. The file should be db compatible with the system and be of right type (for example contain Tcl procs or xql queries).

Parameters:
path - The path of the file relative to server root
Returns:
1 If file is watchable and 0 otherwise. The proc will throw an error if the file doesn't exist or if the given path cannot be parsed as a path relative to server root.
Author:
Peter Marklund

See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 apm_get_watchable_files apm_get_watchable_files (private) apm_file_watchable_p apm_file_watchable_p apm_get_watchable_files->apm_file_watchable_p packages/acs-admin/www/apm/version-files.tcl packages/acs-admin/ www/apm/version-files.tcl packages/acs-admin/www/apm/version-files.tcl->apm_file_watchable_p apm_guess_db_type apm_guess_db_type (public) apm_file_watchable_p->apm_guess_db_type apm_guess_file_type apm_guess_file_type (public) apm_file_watchable_p->apm_guess_file_type db_type db_type (public) apm_file_watchable_p->db_type

Testcases:
No testcase defined.

apm_files_load (private)

 apm_files_load [ -force_reload ] [ -callback callback ] files

Load the set of files into the currently running Tcl interpreter.

Switches:
-force_reload (boolean) (defaults to "0") (optional)
Indicates if the file should be loaded even if it is already loaded in the interpreter.
-callback (defaults to "apm_dummy_callback") (optional)
Parameters:
files

Partial Call Graph (max 5 caller/called nodes):
%3 apm_load_libraries apm_load_libraries (private) apm_files_load apm_files_load apm_load_libraries->apm_files_load apm_callback_and_log apm_callback_and_log (public) apm_files_load->apm_callback_and_log apm_source apm_source (public) apm_files_load->apm_source db_release_unused_handles db_release_unused_handles (public) apm_files_load->db_release_unused_handles

Testcases:
No testcase defined.

apm_generate_tarball (public)

 apm_generate_tarball version_id

Generates a tarball for a version, placing it in the content repository. DCW - 2001-05-03, change to use the content repository for tarball storage.

Parameters:
version_id

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-admin/www/apm/version-generate-tarball.tcl packages/acs-admin/ www/apm/version-generate-tarball.tcl apm_generate_tarball apm_generate_tarball packages/acs-admin/www/apm/version-generate-tarball.tcl->apm_generate_tarball ad_conn ad_conn (public) apm_generate_tarball->ad_conn ad_tmpnam ad_tmpnam (public) apm_generate_tarball->ad_tmpnam apm_dev_null apm_dev_null (private) apm_generate_tarball->apm_dev_null apm_get_package_files apm_get_package_files (public) apm_generate_tarball->apm_get_package_files apm_gzip_cmd apm_gzip_cmd (public) apm_generate_tarball->apm_gzip_cmd

Testcases:
No testcase defined.

apm_get_watchable_files (private)

 apm_get_watchable_files package_key

Get a list of paths relative to server root of watchable files in the given package

Parameters:
package_key - Key of the package to get paths for
Author:
Peter Marklund

Partial Call Graph (max 5 caller/called nodes):
%3 apm_cancel_all_watches apm_cancel_all_watches (public) apm_get_watchable_files apm_get_watchable_files apm_cancel_all_watches->apm_get_watchable_files apm_watch_all_files apm_watch_all_files (public) apm_watch_all_files->apm_get_watchable_files ad_find_all_files ad_find_all_files (public) apm_get_watchable_files->ad_find_all_files ad_make_relative_path ad_make_relative_path (public) apm_get_watchable_files->ad_make_relative_path apm_file_watchable_p apm_file_watchable_p (public) apm_get_watchable_files->apm_file_watchable_p

Testcases:
No testcase defined.

apm_gzip_cmd (public)

 apm_gzip_cmd
Returns:
A valid command name for gzip.

Partial Call Graph (max 5 caller/called nodes):
%3 apm_build_repository apm_build_repository (private) apm_gzip_cmd apm_gzip_cmd apm_build_repository->apm_gzip_cmd apm_extract_tarball apm_extract_tarball (public) apm_extract_tarball->apm_gzip_cmd apm_generate_tarball apm_generate_tarball (public) apm_generate_tarball->apm_gzip_cmd apm_load_apm_file apm_load_apm_file (public) apm_load_apm_file->apm_gzip_cmd packages/acs-tcl/lib/build-repository.tcl packages/acs-tcl/ lib/build-repository.tcl packages/acs-tcl/lib/build-repository.tcl->apm_gzip_cmd

Testcases:
No testcase defined.

apm_load_apm_file (public)

 apm_load_apm_file [ -callback callback ] [ -url url ] [ file_path ]

Uncompresses and loads an APM file into the filesystem.

Switches:
-callback (defaults to "apm_dummy_callback") (optional)
-url (optional)
If specified, will download the APM file first.
Parameters:
file_path (optional)
Returns:
If successful, a path to the .info file of the package uncompressed into the apm-workspace directory

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-admin/www/apm/package-load-2.tcl packages/acs-admin/ www/apm/package-load-2.tcl apm_load_apm_file apm_load_apm_file packages/acs-admin/www/apm/package-load-2.tcl->apm_load_apm_file packages/acs-admin/www/install/install-3.tcl packages/acs-admin/ www/install/install-3.tcl packages/acs-admin/www/install/install-3.tcl->apm_load_apm_file ad_file ad_file (public) apm_load_apm_file->ad_file ad_tmpnam ad_tmpnam (public) apm_load_apm_file->ad_tmpnam apm_callback_and_log apm_callback_and_log (public) apm_load_apm_file->apm_callback_and_log apm_dev_null apm_dev_null (private) apm_load_apm_file->apm_dev_null apm_gzip_cmd apm_gzip_cmd (public) apm_load_apm_file->apm_gzip_cmd

Testcases:
No testcase defined.

apm_mkdir (private)

 apm_mkdir path

Creates the directory specified by path and returns it.

Parameters:
path

Partial Call Graph (max 5 caller/called nodes):
%3 apm_workspace_dir apm_workspace_dir (public) apm_mkdir apm_mkdir apm_workspace_dir->apm_mkdir apm_workspace_install_dir apm_workspace_install_dir (public) apm_workspace_install_dir->apm_mkdir

Testcases:
No testcase defined.

apm_package_info_file_path (public)

 apm_package_info_file_path [ -path path ] package_key

Returns the path to a .info file in a package directory, or throws an error if none exists. Currently, only $package_key.info is recognized as a specification file.

Switches:
-path (optional)
Parameters:
package_key

Partial Call Graph (max 5 caller/called nodes):
%3 test_upgrade upgrade (test acs-lang) apm_package_info_file_path apm_package_info_file_path test_upgrade->apm_package_info_file_path acs_package_root_dir acs_package_root_dir (public) apm_package_info_file_path->acs_package_root_dir ad_file ad_file (public) apm_package_info_file_path->ad_file apm::package_version::attributes::set_all_instances_names apm::package_version::attributes::set_all_instances_names (private) apm::package_version::attributes::set_all_instances_names->apm_package_info_file_path apm_package_install apm_package_install (public) apm_package_install->apm_package_info_file_path apm_scan_packages apm_scan_packages (public) apm_scan_packages->apm_package_info_file_path apm_simple_package_install apm_simple_package_install (public) apm_simple_package_install->apm_package_info_file_path lang::test::setup_test_package lang::test::setup_test_package (private) lang::test::setup_test_package->apm_package_info_file_path

Testcases:
upgrade

apm_system_paths (private)

 apm_system_paths
Returns:
a list of acceptable system paths to search for executables in.

Partial Call Graph (max 5 caller/called nodes):
%3 ad_acs_kernel_id ad_acs_kernel_id (public) ad_parameter_all_values_as_list ad_parameter_all_values_as_list (public) apm_system_paths apm_system_paths apm_system_paths->ad_acs_kernel_id apm_system_paths->ad_parameter_all_values_as_list

Testcases:
No testcase defined.

apm_tar_cmd (public)

 apm_tar_cmd
Returns:
A valid command name for tar.

Partial Call Graph (max 5 caller/called nodes):
%3 apm_build_repository apm_build_repository (private) apm_tar_cmd apm_tar_cmd apm_build_repository->apm_tar_cmd apm_extract_tarball apm_extract_tarball (public) apm_extract_tarball->apm_tar_cmd apm_generate_tarball apm_generate_tarball (public) apm_generate_tarball->apm_tar_cmd apm_load_apm_file apm_load_apm_file (public) apm_load_apm_file->apm_tar_cmd packages/acs-tcl/lib/build-repository.tcl packages/acs-tcl/ lib/build-repository.tcl packages/acs-tcl/lib/build-repository.tcl->apm_tar_cmd

Testcases:
No testcase defined.

apm_transfer_file (private)

 apm_transfer_file [ -url url ] [ -output_file_name output_file_name ]
Switches:
-url (optional)
-output_file_name (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 apm_load_apm_file apm_load_apm_file (public) apm_transfer_file apm_transfer_file apm_load_apm_file->apm_transfer_file util::http::available util::http::available (public) apm_transfer_file->util::http::available util::http::get util::http::get (public) apm_transfer_file->util::http::get util::which util::which (public) apm_transfer_file->util::which

Testcases:
No testcase defined.

apm_watch_all_files (public)

 apm_watch_all_files package_key

Watch all Tcl procs and xql query files in the given package

Parameters:
package_key
Author:
Peter Marklund

See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 ds_watch_packages ds_watch_packages (private) apm_watch_all_files apm_watch_all_files ds_watch_packages->apm_watch_all_files packages/acs-admin/www/apm/package-watch.tcl packages/acs-admin/ www/apm/package-watch.tcl packages/acs-admin/www/apm/package-watch.tcl->apm_watch_all_files apm_file_watch apm_file_watch (public) apm_watch_all_files->apm_file_watch apm_get_watchable_files apm_get_watchable_files (private) apm_watch_all_files->apm_get_watchable_files

Testcases:
No testcase defined.

apm_workspace_dir (public)

 apm_workspace_dir

Return the path to the apm-workspace, creating the directory if necessary.

Partial Call Graph (max 5 caller/called nodes):
%3 apm_package_deinstall apm_package_deinstall (public) apm_workspace_dir apm_workspace_dir apm_package_deinstall->apm_workspace_dir apm_workspace_install_dir apm_workspace_install_dir (public) apm_workspace_install_dir->apm_workspace_dir ad_file ad_file (public) apm_workspace_dir->ad_file apm_mkdir apm_mkdir (private) apm_workspace_dir->apm_mkdir

Testcases:
No testcase defined.

apm_workspace_install_dir (public)

 apm_workspace_install_dir

Return the path to the installation directory of the apm-workspace, creating the directory if necessary.

Partial Call Graph (max 5 caller/called nodes):
%3 apm_load_apm_file apm_load_apm_file (public) apm_workspace_install_dir apm_workspace_install_dir apm_load_apm_file->apm_workspace_install_dir apm_package_install apm_package_install (public) apm_package_install->apm_workspace_install_dir apm_scan_packages apm_scan_packages (public) apm_scan_packages->apm_workspace_install_dir packages/acs-admin/www/apm/package-load-2.tcl packages/acs-admin/ www/apm/package-load-2.tcl packages/acs-admin/www/apm/package-load-2.tcl->apm_workspace_install_dir packages/acs-admin/www/apm/packages-install-2.tcl packages/acs-admin/ www/apm/packages-install-2.tcl packages/acs-admin/www/apm/packages-install-2.tcl->apm_workspace_install_dir ad_file ad_file (public) apm_workspace_install_dir->ad_file apm_mkdir apm_mkdir (private) apm_workspace_install_dir->apm_mkdir apm_workspace_dir apm_workspace_dir (public) apm_workspace_install_dir->apm_workspace_dir

Testcases:
No testcase defined.
[ show source ]