apm_is_catalog_file (public)

 apm_is_catalog_file file_path

Defined in packages/acs-bootstrap-installer/tcl/30-apm-load-procs.tcl

Given a file path return 1 if the path represents a message catalog file and 0 otherwise.

Parameters:
file_path - Should be absolute or relative to OpenACS /packages dir or one of its parent dirs.
Author:
Peter Marklund
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 test_apm_guess_file_type apm_guess_file_type (test acs-bootstrap-installer) apm_is_catalog_file apm_is_catalog_file test_apm_guess_file_type->apm_is_catalog_file apm_parse_catalog_path apm_parse_catalog_path (public) apm_is_catalog_file->apm_parse_catalog_path apm_guess_file_type apm_guess_file_type (public) apm_guess_file_type->apm_is_catalog_file lang::catalog::assert_catalog_file lang::catalog::assert_catalog_file (private) lang::catalog::assert_catalog_file->apm_is_catalog_file lang::catalog::get_catalog_files lang::catalog::get_catalog_files (private) lang::catalog::get_catalog_files->apm_is_catalog_file

Testcases:
apm_guess_file_type
Source code:
    array set filename_info [apm_parse_catalog_path $file_path]

    if { [array size filename_info] == 0 } {
        # Parsing failed
        set return_value 0
    } else {
        # Parsing succeeded
        set prefix $filename_info(prefix)
        if { $prefix eq "" } {
            # No prefix - this is considered a catalog file
            set return_value 1
        } else {
            # Catalog files don't have a prefix before the package_key
            set return_value 0
        }
    }

    return $return_value
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: