mantaLs: Lists, searches, filters, sorts and formats Manta directory...

Description Usage Arguments See Also Examples

View source: R/mantaLs.R

Description

Used for getting disk size, number of objects, number of subdirectories. Searching for filenames with regular expressions (using R grep). Sorting listings by filename, time, or size.

Usage

1
2
3
mantaLs(mantapath, grepfor, json, l = "names", items = "a",
  sortby = "none", decreasing = FALSE, ignore.case = FALSE,
  perl = FALSE, verbose = FALSE, internal = FALSE)

Arguments

mantapath

character, optional. Current subdirectory set by mantaSetwd is used, otherwise specify full Manta path to subdirectory. Supports ~~ expansion to your Manta username, e.g. "~~/public" and UTF-8 encoded characters.

grepfor

character optional. Regular expression for grep name search. Uses R regexps, N.B. use "[.]txt", not "*.txt" to match filename extensions.

json

optional. Input saved JSON data from mantaLs(format='json') used for reprocessing previously retrieved listings. Include previously specified mantapath if you wish to recover true paths.

l

character optional.
Specifies listing output format by 'names', 'l', 'paths', 'URL', 'n', 'du', 'R', 'Rraw', 'URL', 'json'..
'names' returns object/directory names.
'l' is a long unix ls -o style of directory listing.
'paths' is a listing of full Manta object pathnames.
'n' is the number of entries in the directory only.
'du' is the number of bytes used by objects (not counting redundancy levels!).
'R' is normalized R structures from JSON with size = 0 for directories, mtime in R time format.
'URL' is the browser format URL for objects, applies to ~~/public objects only.
'Rraw' is R struct unparsed, unsorted, unnormalized, can convert back to json with toJSON.
'json' is exactly what the server replies - sorting/filtering are not applied.

items

character optional. 'a' for all, 'd' for directory, 'o' for object.

sortby

character, optional. Specify 'none', 'name', 'time', or 'size'.

decreasing

logical, optional. Argument passed to R order for sorting.

ignore.case

logical, optional. Argument passed to R grep for searching.

perl

logical, optional. Argument passed to R grep for searching.

verbose

logical, optional. Verbose HTTPS RCurl data output on Unix.

internal

logical, Internal use by mantaFind.

See Also

mantaFind

Other mantaLs: mantaExists; mantaLs.du; mantaLs.l; mantaLs.n; mantaLs.paths; mantaLs.url

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
## List names of  all objects stored in the directory
## specified by mantaSetwd(),
mantaLs()

## List all objects ending in .jpg or .JPG
## in your Manta ~~/public/images directory,
## Show a UNIX-like result sorted by file size:
mantaLs("~~/public/images", l = 'l', items = 'o', grepfor = "[.]jpg",
ignore.case = TRUE, sortby = 'size')

## Download all objects in current Manta directory, non recursive find:
#mantaGet(mantaLs.paths(items = 'o'))


## End(Not run)

joyent/mantaRSDK documentation built on May 19, 2019, 10:43 p.m.