664
665
666
667
668
669
670
671
|
set dirname [file dirname $filename]
file mkdir $dirname
return $filename
}
}
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
|
set dirname [file dirname $filename]
file mkdir $dirname
return $filename
}
proc prepare_to_create {path} {
if {[exists $path] != ""} {
return -code error "File already exists"
}
set filename [openpath $path "create"]
set dirname [file dirname $filename]
file mkdir $dirname
return $filename
}
proc localpath {path} {
array set pathinfo [_parsepath $path]
if {$pathinfo(_type) != "files"} {
return -code error "invalid type"
}
set localpath [_localpath $pathinfo(package) $pathinfo(hostname) $pathinfo(file)]
return $localpath
}
}
|