1
1
mirror of https://github.com/urbit/shrub.git synced 2024-12-29 07:03:37 +03:00
shrub/pkg/arvo/gen/hood/mv.hoon

19 lines
396 B
Plaintext
Raw Normal View History

2016-10-22 02:44:39 +03:00
:: Kiln: Move file in clay
2016-02-05 05:57:44 +03:00
::
2016-02-05 06:05:37 +03:00
:::: /hoon/mv/hood/gen
2016-02-05 05:57:44 +03:00
::
/? 310
=, space:userlib
2015-09-12 03:24:51 +03:00
:- %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)])