util::resources::can_install_locally (public)
util::resources::can_install_locally -resource_info resource_info \ [ -version_segment version_segment ]
Defined in packages/acs-tcl/tcl/utilities-procs.tcl
Check, whether the operating system's permissions allow us to install in the configured directories.
- Switches:
- -resource_info (required)
- a dict containing at least resourceDir
- -version_segment (optional)
- an optional directory, under the resource directory
- Author:
- Gustaf Neumann
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: set can_install 1 set resource_dir [dict get $resource_info resourceDir] if {![ad_file isdirectory $resource_dir]} { try { file mkdir $resource_dir } on error {errorMsg} { set can_install 0 } } if {$can_install && $version_segment ne ""} { set path $resource_dir/$version_segment if {![ad_file isdirectory $path]} { try { file mkdir $path # # We check on the version-dir, if the package is # installed, therefore, don't create an empty one. # file delete $path } on error {errorMsg} { set can_install 0 } } else { set can_install [ad_file writable $path] } } return $can_installXQL Not present: PostgreSQL, Oracle Generic XQL file: packages/acs-tcl/tcl/utilities-procs.xql