apm_guess_file_type (public)
apm_guess_file_type package_key path
Defined in packages/acs-bootstrap-installer/tcl/30-apm-load-procs.tcl
Guesses and returns the file type key corresponding to a particular path (or an empty string if none is known).
$pathshould be relative to the package directory (e.g.,www/index.tcl) for/packages/bboard/admin-www/index.tcl. We use the following rules:Rules are applied in this order (stopping with the first match).
- Files with extension
.sqlare considered data-model files,- Files with extension
.datare considered SQL data files.- Files with extension
.ctlare considered sql data loader control files. or if any path contains the substringupgrade, data-model upgrade files.- Files with extension
.sqljare considered sqlj_code files.- Files with extension
.infoare considered package specification files.- Files with extension
.xqlare considered query files.- Files with extension
.javaare considered java code files.- Files with extension
.jarare considered java archive files.- Files with a path component named
docare considered documentation files.- Files with extension
.plor.shor which have a path component namedbin, are considered shell-executable files.- Files with a path component named
templatesare considered template files.- Files with extension
.htmlor.adp, in the top level of the package, are considered documentation files.- Files with a path component named
wwworadmin-wwware considered content-page files.- Files with a path component named
libare considered include_page files.- Files under package-key/tcl ending in
-procs(-)+()*.tcl)or-init.tclare considered Tcl procedure or Tcl initialization files, respectively.- File ending in
.tclare considered Tcl utility script files (normally found only in the bootstrap installer).- Files with extension
.xmlin the directory catalog are considered message catalog files.- Tcl procs or init files under package-key/tcl in a test directory are of type test_procs and test_init respectively.
- Parameters:
- package_key (required)
- path (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- apm_guess_file_type