template::util::get_url_directory (public)
template::util::get_url_directory url
Defined in packages/acs-templating/tcl/util-procs.tcl
Get the directory portion of a URL. If the URL has a trailing slash, then return the entire URL.
- Parameters:
- url (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- get_url_directory
Source code: set directory $url set lastchar [string range $url [string length $url]-1 end] if {$lastchar ne "/" } { set directory [file dirname $url]/ if {$directory eq "//"} { # root directory is a special case set directory / } } return $directoryXQL Not present: Generic, PostgreSQL, Oracle