mirror of
https://github.com/urbit/shrub.git
synced 2024-12-15 04:22:48 +03:00
20 lines
406 B
Plaintext
20 lines
406 B
Plaintext
:: Kiln: Move file in clay
|
|
::
|
|
:::: /hoon/mv/hood/gen
|
|
::
|
|
/? 310
|
|
/+ old-zuse
|
|
=, old-zuse
|
|
:- %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)])
|