- 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
- apm_cancel_all_watches (public)
- apm_dev_null (private)
- apm_extract_tarball (public)
- apm_file_type_keys (public, deprecated)
- apm_file_type_names (public)
- apm_file_watch (public)
- apm_file_watch_cancel (public)
- apm_file_watchable_p (public)
- apm_files_load (private)
- apm_generate_tarball (public)
- apm_get_watchable_files (private)
- apm_gzip_cmd (public)
- apm_load_apm_file (public)
- apm_mkdir (private)
- apm_package_info_file_path (public)
- apm_system_paths (private)
- apm_tar_cmd (public)
- apm_transfer_file (private)
- apm_watch_all_files (public)
- apm_workspace_dir (public)
- apm_workspace_install_dir (public)
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):
- Testcases:
- No testcase defined.
apm_dev_null (private)
apm_dev_null
- Returns:
- null device
- Partial Call Graph (max 5 caller/called nodes):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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 (optional, boolean, defaults to
"0"
)- Indicates if the file should be loaded even if it is already loaded in the interpreter.
- -callback (optional, defaults to
"apm_dummy_callback"
)- Parameters:
- files (required)
- Partial Call Graph (max 5 caller/called nodes):
- 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):
- Testcases:
- apm_tarballs
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 (required)
- Key of the package to get paths for
- Author:
- Peter Marklund
- Partial Call Graph (max 5 caller/called nodes):
- 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):
- 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):
- Testcases:
- No testcase defined.
apm_mkdir (private)
apm_mkdir path
Creates the directory specified by path and returns it.
- Parameters:
- path (required)
- Partial Call Graph (max 5 caller/called nodes):
- 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):
- 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):
- 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):
- Testcases:
- acs_tcl_exec_required_dependencies, acs_tcl_exec_optional_dependencies
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):
- 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 (required)
- Author:
- Peter Marklund
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- 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):
- 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):
- Testcases:
- apm_workspace_directories