mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-23 23:12:04 +03:00
a539d986a7
In favor of [type] syntax. Turns a bunch of ++ into +$ along the way.
19 lines
396 B
Plaintext
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)])
|