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).
$path
should 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
.sql
are considered data-model files,- Files with extension
.dat
are considered SQL data files.- Files with extension
.ctl
are considered sql data loader control files. or if any path contains the substringupgrade
, data-model upgrade files.- Files with extension
.sqlj
are considered sqlj_code files.- Files with extension
.info
are considered package specification files.- Files with extension
.xql
are considered query files.- Files with extension
.java
are considered java code files.- Files with extension
.jar
are considered java archive files.- Files with a path component named
doc
are considered documentation files.- Files with extension
.pl
or.sh
or which have a path component namedbin
, are considered shell-executable files.- Files with a path component named
templates
are considered template files.- Files with extension
.html
or.adp
, in the top level of the package, are considered documentation files.- Files with a path component named
www
oradmin-www
are considered content-page files.- Files with a path component named
lib
are considered include_page files.- Files under package-key/tcl ending in
-procs(-)+()*.tcl)
or-init.tcl
are considered Tcl procedure or Tcl initialization files, respectively.- File ending in
.tcl
are considered Tcl utility script files (normally found only in the bootstrap installer).- Files with extension
.xml
in 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
path
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- apm_guess_file_type