apm_guess_file_type

EveAndersson.com : API Browser : apm_guess_file_type

apm_guess_file_type

apm_guess_file_type path
Defined in packages/acs-core/apm-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., apm/admin-www/index.tcl for /packages/acs-core/apm/admin-www/index.tcl. We use the following rules:

  1. Files with extension .sql are considered data-model files, or if any path contains the substring upgrade, data-model upgrade files.
  2. Files with extension .info are considered package specification files.
  3. Files with a path component named doc are considered documentation files.
  4. Files with extension .pl or .sh or which have a path component named bin, are considered shell-executable files.
  5. Files with a path component named templates are considered template files.
  6. Files with extension .html or .adp, in the top level of the package, are considered documentation files.
  7. Files with a path component named www or admin-www are considered content-page files.
  8. Files ending in -procs.tcl or -init.tcl are considered Tcl procedure or Tcl initialization files, respectively.
Rules are applied in this order (stopping with the first match).

Parameters:
path
[ show source ]

Show another procedure:

eve@eveandersson.com