mirror of
https://github.com/urbit/shrub.git
synced 2024-12-29 15:14:17 +03:00
sss: add +fork
and +copy
This commit is contained in:
parent
888bad3551
commit
e0904c105c
@ -241,6 +241,23 @@
|
||||
?. =(next (add aeon.last waves.rul.tide)) buoy
|
||||
buoy(tid (form tide))
|
||||
::
|
||||
++ fork :: Fork a pub into an empty path.
|
||||
|= [from=paths to=paths]
|
||||
^- pubs
|
||||
:- %0
|
||||
?< (~(has by pub) to)
|
||||
(~(put by pub) to (~(got by pub) from))
|
||||
::
|
||||
++ copy :: Fork a sub into an empty path.
|
||||
|= [sub=_(mk-subs lake *) from=[ship dude *] to=paths]
|
||||
^- pubs
|
||||
:- %0
|
||||
?< (~(has by pub) to)
|
||||
%+ ~(put by pub) to
|
||||
%* . *$<(aeon buoy)
|
||||
rok.tid (put:rok ~ [aeon rock]:(need (~(got by +:sub) from)))
|
||||
==
|
||||
::
|
||||
++ perm :: Change permissions with gate.
|
||||
|= [where=(list paths) diff=$-((unit (set ship)) (unit (set ship)))]
|
||||
^- pubs
|
||||
|
Loading…
Reference in New Issue
Block a user