urbit/pkg/arvo/gen/hood/mv.hoon
fang a539d986a7
various: move away from {type} syntax
In favor of [type] syntax.
Turns a bunch of ++ into +$ along the way.
2020-11-26 17:43:26 +01:00

19 lines
396 B
Plaintext

:: Kiln: Move file in clay
::
:::: /hoon/mv/hood/gen
::
/? 310
=, space:userlib
:- %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> ~]
:- "moved" :- ~
%+ furl (fray input)
(foal output -:(flop input) [%noun .^(* %cx input)])