adls_rename: Rename a file/directory.

Description Usage Arguments Value See Also Examples

Description

Rename a file/directory.

Usage

1
adls_rename(adls, path, destination)

Arguments

adls

adls S3 object, generated using adls().

path

character, remote path, defined with respect to root-path in adls$base_url. You may find file.path() to be useful to compose the path.

destination

character, remote path for the destination, defined with respect to root-path in adls$base_url.

Value

A logical indicating the success of the operation.

See Also

WebHDFS documentation for "Rename a File/Directory"

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## Not run: 
  library("AzureOAuth")

  # create token (assumes Azure native app)
  token <- oauth_token_azure(
    tenant_id = "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
    application_id = "ffffffff-gggg-hhhh-iiii-jjjjjjjjjjjj",
    name = "foo"
  )

  # create adls object with base-URL and token
  adls_example <- adls(
    base_url = adls_url("bar"),
    token = token
  )

  # create a directory
  adls_mkdirs(adls_example, "baz")

  # reanme the newly-created directory
  adls_rename(adls_example, "baz", "baz_new")

## End(Not run)

ijlyttle/AzureDatalakeStore documentation built on May 5, 2019, 5:56 p.m.