shrub/gen/hood/cp.hoon
2016-10-21 16:44:39 -07:00

17 lines
372 B
Plaintext

:: Kiln: copy file in clay
::
:::: /hoon/cp/hood/gen
::
/? 310
:- %say
|= {^ {input/path output/path $~} $~}
:- %kiln-info
?. =(-:(flop input) -:(flop output))
["Can't move to a different mark" ~]
=+ dir=.^(arch %cy input)
?~ fil.dir
~& "No such file:"
[<input> ~]
:- "copied"
`(foal output -:(flop input) [%atom %t ~] .^(* %cx input)) :: XX type