remove_adf_entry | R Documentation |
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.
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, ...)
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 |
Returns the device connection
Pepijn de Vries
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.