• Publicity: Public Only All

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.47 2024/09/11 06:15:48 gustafn 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 (required)
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_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 (required)
dir (required)

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

Testcases:
apm_tarballs

apm_file_type_keys (public, deprecated)

 apm_file_type_keys
Deprecated. Invoking this procedure generates a warning.

Returns a list of valid file type keys. DEPRECATED: this API in not used in upstream code and can be inlined by a simple dict idiom.

Author:
Peter Marklund
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 ad_log_deprecated ad_log_deprecated (public) apm_file_type_names apm_file_type_names (public) apm_file_type_keys apm_file_type_keys apm_file_type_keys->ad_log_deprecated 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 test_apm_version_api apm_version_api (test acs-tcl) apm_file_type_names apm_file_type_names test_apm_version_api->apm_file_type_names apm_file_type_keys apm_file_type_keys (public, deprecated) 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:
apm_version_api

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 (required)
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 (required)
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_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 (required)

Partial Call Graph (max 5 caller/called nodes):
%3 test_apm_tarballs apm_tarballs (test acs-tcl) apm_generate_tarball apm_generate_tarball test_apm_tarballs->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 packages/acs-admin/www/apm/version-generate-tarball.tcl packages/acs-admin/ www/apm/version-generate-tarball.tcl packages/acs-admin/www/apm/version-generate-tarball.tcl->apm_generate_tarball

Testcases:
apm_tarballs

apm_gzip_cmd (public)

 apm_gzip_cmd
Returns:
A valid command name for gzip.

Partial Call Graph (max 5 caller/called nodes):
%3 test_acs_tcl_exec_optional_dependencies acs_tcl_exec_optional_dependencies (test acs-tcl) apm_gzip_cmd apm_gzip_cmd test_acs_tcl_exec_optional_dependencies->apm_gzip_cmd test_acs_tcl_exec_required_dependencies acs_tcl_exec_required_dependencies (test acs-tcl) test_acs_tcl_exec_required_dependencies->apm_gzip_cmd util::which util::which (public) apm_gzip_cmd->util::which _acs_tcl__acs_tcl_external_dependencies_helper _acs_tcl__acs_tcl_external_dependencies_helper (private) _acs_tcl__acs_tcl_external_dependencies_helper->apm_gzip_cmd apm_build_repository apm_build_repository (private) 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_git_build_repository apm_git_build_repository (private) apm_git_build_repository->apm_gzip_cmd

Testcases:
acs_tcl_exec_required_dependencies, acs_tcl_exec_optional_dependencies

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 (optional, defaults to "apm_dummy_callback")
-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_mktmpdir ad_mktmpdir (public) apm_load_apm_file->ad_mktmpdir 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

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

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_git_build_repository apm_git_build_repository (private) apm_git_build_repository->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

Testcases:
upgrade

apm_tar_cmd (public)

 apm_tar_cmd
Returns:
A valid command name for tar.

Partial Call Graph (max 5 caller/called nodes):
%3 test_acs_tcl_exec_optional_dependencies acs_tcl_exec_optional_dependencies (test acs-tcl) apm_tar_cmd apm_tar_cmd test_acs_tcl_exec_optional_dependencies->apm_tar_cmd test_acs_tcl_exec_required_dependencies acs_tcl_exec_required_dependencies (test acs-tcl) test_acs_tcl_exec_required_dependencies->apm_tar_cmd util::which util::which (public) apm_tar_cmd->util::which _acs_tcl__acs_tcl_external_dependencies_helper _acs_tcl__acs_tcl_external_dependencies_helper (private) _acs_tcl__acs_tcl_external_dependencies_helper->apm_tar_cmd apm_build_repository apm_build_repository (private) 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_git_build_repository apm_git_build_repository (private) apm_git_build_repository->apm_tar_cmd

Testcases:
acs_tcl_exec_required_dependencies, acs_tcl_exec_optional_dependencies

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 (required)
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 test_apm_workspace_directories apm_workspace_directories (test acs-tcl) apm_workspace_dir apm_workspace_dir test_apm_workspace_directories->apm_workspace_dir ad_file ad_file (public) apm_workspace_dir->ad_file apm_mkdir apm_mkdir (private) apm_workspace_dir->apm_mkdir apm_package_deinstall apm_package_deinstall (public) apm_package_deinstall->apm_workspace_dir apm_workspace_install_dir apm_workspace_install_dir (public) apm_workspace_install_dir->apm_workspace_dir

Testcases:
apm_workspace_directories

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 test_apm_workspace_directories apm_workspace_directories (test acs-tcl) apm_workspace_install_dir apm_workspace_install_dir test_apm_workspace_directories->apm_workspace_install_dir 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 apm_load_apm_file apm_load_apm_file (public) 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

Testcases:
apm_workspace_directories
[ show source ]