util_current_directory (public)
util_current_directory
Defined in packages/acs-tcl/tcl/utilities-procs.tcl
Returns the directory of the current URL.
We can't just use [file dirname [ad_conn url]] because we want /foo/bar/ to return /foo/bar/ and not /foo .
Also, we want to return directory WITH the trailing slash so that programs that use this proc don't have to treat the root directory as a special case.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: set path [ad_conn vhost_url] set lastchar [string index $path end] if {$lastchar eq "/" } { return $path } else { set file_dirname [ad_file dirname $path] # Treat the case of the root directory special if {$file_dirname eq "/" } { return / } else { return $file_dirname/ } }XQL Not present: PostgreSQL, Oracle Generic XQL file: packages/acs-tcl/tcl/utilities-procs.xql