Learn R Programming

minioclient (version 0.0.6)

mc_rm: Remove files or directories

Description

This function uses the mc command to remove files or directories at the specified target location.

Usage

mc_rm(target, recursive = FALSE, flags = "", verbose = FALSE)

Value

Returns the list from processx::run(), with components status, stdout, stderr, and timeout; invisibly.

Arguments

target

Character string specifying the target file or directory path to be removed.

recursive

Logical indicating whether to recursively remove directories. Default is FALSE.

flags

Additional flags to be passed to the rm command. Default is an empty string.

verbose

Logical indicating whether to list files removed. Default is FALSE.

Details

see mc("rm -h") for details.

Examples

Run this code
if (FALSE) { # interactive()

# Remove a file
mc_rm("path/to/file.txt")

# Remove a directory recursively
mc_rm("path/to/directory", recursive = TRUE)
}

Run the code above in your browser using DataLab