util::resources::is_installed_locally (public)

 util::resources::is_installed_locally -resource_info resource_info \
    [ -version_dir version_dir ]

Defined in packages/acs-tcl/tcl/utilities-procs.tcl

Check, if the required resource files are installed locally. When the version_dir is specified, it is possible to have different versions locally installed.

Switches:
-resource_info
(required)
a dict containing resourceDir, cssFiles, jsFiles, and extraFiles
-version_dir
(optional)
an optional directory, under the resource directory
Author:
Gustaf Neumann

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-tcl/lib/check-installed.tcl packages/acs-tcl/ lib/check-installed.tcl util::resources::is_installed_locally util::resources::is_installed_locally packages/acs-tcl/lib/check-installed.tcl->util::resources::is_installed_locally ad_file ad_file (public) util::resources::is_installed_locally->ad_file util::resources::version_dir util::resources::version_dir (public) util::resources::is_installed_locally->util::resources::version_dir

Testcases:
No testcase defined.
Source code:
        set installed 1
        set version_dir [version_dir  -version_dir $version_dir  -resource_info $resource_info]
        set resource_dir [dict get $resource_info resourceDir]
        set downloadFiles {}
        ns_log notice "check downloadURLs <[dict exists $resource_info downloadURLs]> // [lsort [dict keys $resource_info]]"
        if {[dict exists $resource_info downloadURLs]} {
            ns_log notice "we have downloadURLs <[dict get $resource_info downloadURLs]>"
            foreach url [dict get $resource_info downloadURLs] {
                lappend downloadFiles [ad_file tail $url]
            }
        }
        set files [concat  [dict get $resource_info cssFiles]  [dict get $resource_info jsFiles]  [dict get $resource_info extraFiles]  $downloadFiles  ]
        ns_log notice "check files <$files>"
        foreach file $files {
            if {$version_dir eq ""} {
                set path $resource_dir/$file
            } else {
                set path $resource_dir/$version_dir/$file
            }
            if {![ad_file readable $path/]} {
                set installed 0
                break
            }
        }
        return $installed
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:
packages/acs-tcl/tcl/utilities-procs.xql

[ hide source ] | [ make this the default ]
Show another procedure: