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

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)

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:

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

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

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

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:

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)

Testcases:
apm_tarballs

apm_gzip_cmd (public)

 apm_gzip_cmd
Returns:
A valid command name for gzip.

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

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)

Testcases:
upgrade

apm_tar_cmd (public)

 apm_tar_cmd
Returns:
A valid command name for tar.

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:

Testcases:
No testcase defined.

apm_workspace_dir (public)

 apm_workspace_dir

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

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.

Testcases:
apm_workspace_directories
[ show source ]