remove_adf_entry {adfExplorer} | R Documentation |
Remove entry (file / directory) from a virtual ADF device
Description
This function removes an entry (file or directory) from a virtual ADF device. At the moment this function only removes a single entry per call, and in case the entry is a directory, the directory needs to be empty before it can be removed.
Usage
remove_adf_entry(x, path, flush = FALSE, ...)
## S3 method for class 'adf_device'
remove_adf_entry(x, path, flush = FALSE, ...)
## S3 method for class 'virtual_path'
remove_adf_entry(x, path, flush = FALSE, ...)
## S3 method for class 'character'
remove_adf_entry.adf_device(x, path, flush = FALSE, ...)
## S3 method for class 'virtual_path'
remove_adf_entry.adf_device(x, path, flush = FALSE, ...)
Arguments
x |
The virtual ADF device from which an entry needs to be deleted or a virtual path pointing
at the entry to be deleted. In case of a virtual device, it should be of class |
path |
A |
flush |
A |
... |
Ignored |
Value
Returns the device connection
Author(s)
Pepijn de Vries
Examples
# Open a connection to a virtual device:
my_device <- demo_adf(write_protected = FALSE)
## List files in directory 'Devs':
list_adf_entries(my_device, "Devs")
## remove the file 'system-configuration' from the virtual device
remove_adf_entry(my_device, "devs/system-configuration")
## List files in directory 'Devs' again:
list_adf_entries(my_device, "Devs")
## close the connection to the virtual device
close(my_device)