mirror of
https://github.com/urbit/shrub.git
synced 2025-01-05 19:46:50 +03:00
moves |cp and |mv implementations back into the generators
This commit is contained in:
parent
97a8aac322
commit
c800b7f489
@ -136,8 +136,6 @@
|
||||
++ poke-kiln-merge (wrap poke-merge):from-kiln
|
||||
++ poke-kiln-cancel (wrap poke-cancel):from-kiln
|
||||
++ poke-kiln-mount (wrap poke-mount):from-kiln
|
||||
++ poke-kiln-cp (wrap poke-cp):from-kiln
|
||||
++ poke-kiln-mv (wrap poke-mv):from-kiln
|
||||
++ poke-kiln-rm (wrap poke-rm):from-kiln
|
||||
++ poke-kiln-schedule (wrap poke-schedule):from-kiln
|
||||
++ poke-kiln-track (wrap poke-track):from-kiln
|
||||
|
@ -4,4 +4,13 @@
|
||||
/? 310
|
||||
:- %say
|
||||
|= {^ {input/path output/path $~} $~}
|
||||
[%kiln-cp input output]
|
||||
?. =(-:(flop input) -:(flop output))
|
||||
~& "Can't move to a different mark"
|
||||
~
|
||||
=+ dir=.^(arch %cy input)
|
||||
?~ fil.dir
|
||||
~& "No such file:"
|
||||
~& <input>
|
||||
~
|
||||
:+ %kiln-info "copied"
|
||||
(foal output -:(flop input) [%atom %t ~] .^(* %cx input)) :: XX type
|
||||
|
@ -4,4 +4,14 @@
|
||||
/? 310
|
||||
:- %say
|
||||
|= {^ {input/path output/path $~} $~}
|
||||
[%kiln-mv input output]
|
||||
?. =(-:(flop input) -:(flop output))
|
||||
~& "Can't move to a different mark"
|
||||
~
|
||||
=+ dir=.^(arch %cy input)
|
||||
?~ fil.dir
|
||||
~& "No such file:"
|
||||
~& <input>
|
||||
~
|
||||
:+ %kiln-info "moved"
|
||||
%+ furl (fray input)
|
||||
(foal output -:(flop input) [%noun .^(* %cx input)])
|
||||
|
@ -157,31 +157,6 @@
|
||||
|= {mez/tape tor/toro}
|
||||
abet:(emit:(spam leaf+mez ~) %info /kiln our tor)
|
||||
::
|
||||
++ poke-cp
|
||||
|= {a/path b/path}
|
||||
?. =(-:(flop a) -:(flop b))
|
||||
=+ ~[leaf+"Can't copy to a different mark"]
|
||||
abet:(spam -)
|
||||
=+ c=.^(arch %cy a)
|
||||
?~ fil.c
|
||||
=+ ~[leaf+"No such file:" leaf+"{<a>}"]
|
||||
abet:(spam -)
|
||||
%+ poke-info "copied"
|
||||
(foal b -:(flop a) [%atom %t ~] .^(* %cx a)) :: XX type
|
||||
::
|
||||
++ poke-mv
|
||||
|= {a/path b/path}
|
||||
?. =(-:(flop a) -:(flop b))
|
||||
=+ ~[leaf+"Can't move to a different mark"]
|
||||
abet:(spam -)
|
||||
=+ c=.^(arch %cy a)
|
||||
?~ fil.c
|
||||
=+ ~[leaf+"No such file:" leaf+"{<a>}"]
|
||||
abet:(spam -)
|
||||
%+ poke-info "moved"
|
||||
%+ furl (fray a)
|
||||
(foal b -:(flop a) [%noun .^(* %cx a)])
|
||||
::
|
||||
++ poke-rm
|
||||
|= a/path
|
||||
=+ b=.^(arch %cy a)
|
||||
|
Loading…
Reference in New Issue
Block a user