18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
proc _cachefile {url key {keyIsHash 1}} {
if {$keyIsHash} {
set key [_hash_sep $key]
}
set file [file join $::appfs::cachedir $key]
file mkdir -- [file dirname $file]
if {![file exists $file]} {
set tmpfile "${file}.new"
set fd [open $tmpfile "w"]
set token [::http::geturl $url -channel $fd]
|
|
|
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
proc _cachefile {url key {keyIsHash 1}} {
if {$keyIsHash} {
set key [_hash_sep $key]
}
set file [file join $::appfs::cachedir $key]
file mkdir [file dirname $file]
if {![file exists $file]} {
set tmpfile "${file}.new"
set fd [open $tmpfile "w"]
set token [::http::geturl $url -channel $fd]
|