rp_path_prefixes (private)

 rp_path_prefixes path

Defined in packages/acs-tcl/tcl/request-processor-procs.tcl

Returns all the prefixes of a path ordered from most to least specific.

Parameters:
path (required)

Partial Call Graph (max 5 caller/called nodes):
%3 rp_handle_request rp_handle_request (private) rp_path_prefixes rp_path_prefixes rp_handle_request->rp_path_prefixes

Testcases:
No testcase defined.
Source code:
    if {[string index $path 0] ne "/"} {
        set path "/$path"
    }
    set path [string trimright $path /]
    if { $path eq "" } {
        return "/"
    }

    set components [split $path "/"]
    set prefixes [list]
    for {set i [expr {[llength $components] -1}]} {$i > 0} {incr i -1} {
        lappend prefixes "[join [lrange $components 0 $i] /]/"
        lappend prefixes [join [lrange $components 0 $i] /]
    }
    lappend prefixes "/"

    return $prefixes
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: