Learn R Programming

adfExplorer (version 2.0.3)

list_adf_entries: List entries in a directory of a virtual ADF device

Description

Get an overview of all entries (files and directories) in a specific directory.

Usage

list_adf_entries(x, path, recursive = FALSE, nested = FALSE, ...)

# S3 method for adf_device list_adf_entries(x, path, recursive = FALSE, nested = FALSE, ...)

# S3 method for virtual_path list_adf_entries(x, path, recursive = FALSE, nested = FALSE, ...)

# S3 method for character list_adf_entries.adf_device(x, path, recursive = FALSE, nested = FALSE, ...)

# S3 method for virtual_path list_adf_entries.adf_device(x, path, recursive = FALSE, ...)

Value

A vector of virtual_path class objects, or a nested list in case nested is TRUE.

Arguments

x

Either an adf_device class object, in which case the virtual_path argument needs to be specified; or, a virtual_path class object.

path

The virtual path for which you wish to obtain a list of entries (see also vignette("virtual_paths")). When missing, entries for the current directory (adf_directory()) are returned, wen x is an adf_device class object. If x is a virtual_path class object, content of the path defined in that object is listed

recursive

A logical value. When set to TRUE, the function is called recursively for all subdirectories in path.

nested

A logical value. When set to The directory tree is returned as a nested list.

...

Ignored

Author

Pepijn de Vries

Examples

Run this code
## First setup a connection to a virtual device
my_device <- demo_adf()

## List all entries in the disk's root:
list_adf_entries(my_device)

## List all entries on the disk as a vector of `virtual paths`:
list_adf_entries(my_device, recursive = TRUE)

##  List all entries on the disk as a nested list:
list_adf_entries(my_device, recursive = TRUE, nested = TRUE)

close(my_device)

Run the code above in your browser using DataLab