ns_md object method file (public)

 ns_md[i] file [ -digest digest ] [ -encoding encoding ] filename args \
    [ args... ]

Defined in

Switches:
-digest (optional, defaults to "sha256")
-encoding (optional, defaults to "hex")
Parameters:
filename (required)
args (required)

Testcases:
No testcase defined.
Source code:
set m [:new -digest $digest]
set r ""
foreach path [concat [list $filename$args] {
    if {![file readable $path]} {
        $m destroy
        return -code error "file $path is not readable"
    }
    set r [$m readfile -encoding $encoding $path]
}
$m destroy
return $r
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: