Description Usage Arguments See Also Examples
As a persistent object store, there are no copy or move
commands on Manta. Instead the mantaSnapln
command
is used to add an object's name into another subdirectory
without physically moving data on the service. Internally
the system takes a ZFS snapshot of the data and the new
object entry is the snapshot. If the original data is
overwritten, the SnapLink still points to the original
snapshot. The R workspace audit trail used by
mantaSave.ws
and mantaLoad.ws
is implemented using mantaSnapln
.
1 | mantaSnapln(from, to, info = TRUE)
|
from |
character, required. Object in current subdirectory or full Manta path to stored object. Vectorized. |
to |
character, required. Snaplink name in current
subdirectory, existing Manta subdirectory or full Manta
object path to the new SnapLink. If |
info |
logical. When FALSE suppresses messages on the console. |
Other Directory: mantaGetwd
;
mantaMkdir
; mantaRmdir
;
mantaRm
; mantaSetwd.public
;
mantaSetwd.reports
;
mantaSetwd.stor
; mantaSetwd
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | ## Not run:
## Save a static hello world HTML page
htmlpage <- paste("<!DOCTYPE html>\n<html>\n<body>\n\n",
"<h1>Hello from Joyent Manta.</h1>\n\n",
"<p>Hello world! from ",
mantaWhoami(),
".</p>\n\n",
"</body>\n</html>", sep="")
file <- file("test_index.html", "wb")
write(htmlpage,file)
close(file)
rm(file)
rm(htmlpage)
## Upload the HTML file to Manta in your private area
mantaSetwd.stor()
mantaPut("test_index.html")
mantaCat("test_index.html")
## Make it public
mantaMkdir("~~/public/test")
mantaSnapln("test_index.html", "~~/public/test")
mantaSnapln("test_index.html", "~~/public/test/index.html")
## copy and paste URL into browser.
mantaLs.url("~~/public/test", grepfor = "[.]html")
## Delete the original in private area
mantaRm("~~/stor/test_index.html")
mantaExists("~~/stor/test_index.html")
## Snaplink copies is still there in ~~/public
mantaExists("~~/public/test/test_index.html")
mantaExists("~~/public/test/index.html")
mantaCat("~~/public/test/index.html")
## Cleanup this demo
# mantaRm("~~/public/test/index.html")
# mantaRm("~~/public/test/test_index.html")
# mantaRmdir("~~/public/test")
# file.remove("test_index.html")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.