R: Backend-independent file manipulation

dfs.empty {rmr2} | R Documentation

## Backend-independent file manipulation

### Description

Check if an item is empty or return its size. Move an item or remove(recursively). Here item is a valid path or `big.data.object`

### Usage

    dfs.empty(fname)
    dfs.exists(fname)
    dfs.size(fname)
    dfs.mv(from, to)
    dfs.rmr(fname)
    dfs.ls(fname)

### Arguments

`fname` | A valid path or `big.data.object`
`from, to` | A valid path

### Details

The size of a directory, for the sake of this commands, is the size of the files contained therein with the exception of hidden files starting with "." and "_". This is not well documented in Hadoop but there is a private call that implements this pattern.

### Value

For `dfs.size` a number of bytes; for `dfs.empty` and `dfs.exists`, a logical; for `dfs.ls` a data.frame

### Examples

    dfs.empty(mapreduce(to.dfs(1:10)))
    dfs.size(mapreduce(to.dfs(1:10)))

[Package rmr2 version 3.3.1 Index]