]> git.saurik.com Git - redis.git/blob - tests/support/tmpfile.tcl
Merge remote branch 'pietern/zset-mem'
[redis.git] / tests / support / tmpfile.tcl
1 set ::tmpcounter 0
2 set ::tmproot "./tests/tmp"
3 file mkdir $::tmproot
4
5 # returns a dirname unique to this process to write to
6 proc tmpdir {basename} {
7 set dir [file join $::tmproot $basename.[pid].[incr ::tmpcounter]]
8 file mkdir $dir
9 set _ $dir
10 }
11
12 # return a filename unique to this process to write to
13 proc tmpfile {basename} {
14 file join $::tmproot $basename.[pid].[incr ::tmpcounter]
15 }