Diff

Differences From Artifact [a96ad61fba]:

To Artifact [3cd77a5342]:


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