Skip to contents

The same operations as unlink(), dir.create() and file.rename(), over any VSI path rather than only the local disk.

Usage

vfs_unlink(path)

vfs_mkdir(path, mode = 755L)

vfs_rmdir(path)

vfs_rename(from, to)

vfs_copy(from, to)

Arguments

path, from, to

VSI paths.

mode

The permission bits for a new directory, as an octal number. Meaningless on the file systems that have no permissions.

Value

Nothing, invisibly. A failure is an error carrying GDAL's reason.

Examples

vfs_write_file("/vsimem/hello.txt", charToRaw("hello"))
vfs_exists("/vsimem/hello.txt")
#> [1] TRUE
vfs_unlink("/vsimem/hello.txt")
vfs_exists("/vsimem/hello.txt")
#> [1] FALSE