file_handling: Easy File Handling

Description Usage Arguments Value See Also Examples

Description

delete - Deletes files and directories.

folder - Create a folder/directory.

Usage

1
2
3
  delete(file = NULL)

  folder(..., folder.name = NULL)

Arguments

file

The name of the file in the working directory or the path to the file to be deleted. If NULL provides a menu of files from the working directory.

...

The name(s) of the folder to be created. If both ... and folder.name are NULL creates a file in the working directory with the creation date and time stamp.

folder.name

A character vector of the name(s) of the folder to be created. Default NULL (if the ... is NULL too) creates a file in the working directory with the creation date and time stamp. Use this argument only if the directory names contain spaces.

Value

delete permanently removes a file/directory.

folder creates a folder/directory.

See Also

unlink, file.remove, dir.create

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
(x <- folder("DELETE.ME"))
which(dir() == "DELETE.ME")
delete("DELETE.ME")
which(dir() == "DELETE.ME")

folder(cat, dog)
lapply(c("cat", "dog"), delete)

## End(Not run)

reports documentation built on May 2, 2019, 8:29 a.m.