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

18 lines
380 B
Plaintext

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