urbit/gen/hood/cp.hoon

18 lines
388 B
Plaintext
Raw Normal View History

2016-10-22 02:44:39 +03:00
:: Kiln: copy file in clay
2016-02-05 05:57:44 +03:00
::
2016-02-05 06:05:37 +03:00
:::: /hoon/cp/hood/gen
2016-02-05 05:57:44 +03:00
::
/? 310
2015-09-12 03:24:51 +03:00
:- %say
=, space:userlib
2018-03-19 07:18:20 +03:00
|= {^ {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