added cp, mv, and rm

This commit is contained in:
Ubuntu 2014-10-03 00:38:30 +00:00
parent f273b2dcf2
commit 154eaf622f
9 changed files with 104 additions and 0 deletions

18
main/app/cp/core.hook Normal file
View File

@ -0,0 +1,18 @@
!:
|_ [hid=hide ~]
++ poke-cp-args
|= [ost=bone you=ship input=path output=path ~]
:_ +>.$
:* [ost %pass /cp %c %info our.hid (foal output .^(%cx input))]
[ost %give %nice ~]
%+ turn (~(tap by sup.hid))
|= [ost=bone *]
:^ ost %give %rush
:- %tang :_ ~
leaf/"copied"
==
++ peer
|=
*
`+>
--

20
main/app/mv/core.hook Normal file
View File

@ -0,0 +1,20 @@
!:
|_ [hid=hide ~]
++ poke-mv-args
|= [ost=bone you=ship input=path output=path ~]
:_ +>.$
:* :^ ost %pass /cp
:^ %c %info our.hid
(furl (foal output .^(%cx input)) (fray input))
[ost %give %nice ~]
%+ turn (~(tap by sup.hid))
|= [ost=bone *]
:^ ost %give %rush
:- %tang :_ ~
leaf/"moved"
==
++ peer
|=
*
`+>
--

18
main/app/rm/core.hook Normal file
View File

@ -0,0 +1,18 @@
!:
|_ [hid=hide ~]
++ poke-rm-args
|= [ost=bone you=ship pax=path ~]
:_ +>.$
:* [ost %pass /cp %c %info our.hid (fray pax)]
[ost %give %nice ~]
%+ turn (~(tap by sup.hid))
|= [ost=bone *]
:^ ost %give %rush
:- %tang :_ ~
leaf/"removed"
==
++ peer
|=
*
`+>
--

View File

@ -0,0 +1,15 @@
::
:::: /hoon/core/zing/pro
::
/? 314
/- cp-args
|_ arg=cp-args
::
++ grab :: convert from
|%
++ noun :: convert from %noun
|= src=*
^+ +>+
+>+(arg (cp-args src))
--
--

View File

@ -0,0 +1,15 @@
::
:::: /hoon/core/zing/pro
::
/? 314
/- mv-args
|_ arg=mv-args
::
++ grab :: convert from
|%
++ noun :: convert from %noun
|= src=*
^+ +>+
+>+(arg (mv-args src))
--
--

View File

@ -0,0 +1,15 @@
::
:::: /hoon/core/zing/pro
::
/? 314
/- rm-args
|_ arg=rm-args
::
++ grab :: convert from
|%
++ noun :: convert from %noun
|= src=*
^+ +>+
+>+(arg (rm-args src))
--
--

View File

@ -0,0 +1 @@
[input=path output=path ~]

View File

@ -0,0 +1 @@
[input=path output=path ~]

View File

@ -0,0 +1 @@
[pax=path ~]