Learn R Programming

AzureStor (version 1.0.0)

adls_filesystem: Operations on an Azure Data Lake Storage Gen2 endpoint

Description

Get, list, create, or delete ADLSgen2 filesystems. Currently (as of December 2018) ADLSgen2 is in general-access public preview.

Usage

adls_filesystem(endpoint, ...)

# S3 method for character adls_filesystem(endpoint, key = NULL, sas = NULL, api_version = getOption("azure_storage_api_version"), ...)

# S3 method for adls_endpoint adls_filesystem(endpoint, name, ...)

# S3 method for adls_filesystem print(x, ...)

list_adls_filesystems(endpoint, ...)

# S3 method for character list_adls_filesystems(endpoint, key = NULL, sas = NULL, api_version = getOption("azure_adls_api_version"), ...)

# S3 method for adls_endpoint list_adls_filesystems(endpoint, ...)

create_adls_filesystem(endpoint, ...)

# S3 method for character create_adls_filesystem(endpoint, key = NULL, sas = NULL, api_version = getOption("azure_adls_api_version"), ...)

# S3 method for adls_filesystem create_adls_filesystem(endpoint, ...)

# S3 method for adls_endpoint create_adls_filesystem(endpoint, name, ...)

delete_adls_filesystem(endpoint, ...)

# S3 method for character delete_adls_filesystem(endpoint, key = NULL, sas = NULL, api_version = getOption("azure_adls_api_version"), ...)

# S3 method for adls_filesystem delete_adls_filesystem(endpoint, ...)

# S3 method for adls_endpoint delete_adls_filesystem(endpoint, name, confirm = TRUE, ...)

Arguments

endpoint

Either an ADLSgen2 endpoint object as created by storage_endpoint or adls_endpoint, or a character string giving the URL of the endpoint.

...

Further arguments passed to lower-level functions.

key, sas

If an endpoint object is not supplied, authentication details. Currently the sas argument is unused.

api_version

If an endpoint object is not supplied, the storage API version to use when interacting with the host. Currently defaults to "2018-06-17".

name

The name of the filesystem to get, create, or delete.

x

For the print method, a file share object.

confirm

For deleting a filesystem, whether to ask for confirmation.

Value

For adls_filesystem and create_adls_filesystem, an S3 object representing an existing or created filesystem respectively.

For list_adls_filesystems, a list of such objects.

Details

You can call these functions in a couple of ways: by passing the full URL of the share, or by passing the endpoint object and the name of the share as a string.

Currently (as of December 2018), if the storage account has hierarchical namespaces enabled, the blob API for the account is disabled. The blob endpoint is still accessible, but blob operations on the endpoint will fail. Full interoperability between blobs and ADLS is planned for 2019.

See Also

storage_endpoint, az_storage

Examples

Run this code
# NOT RUN {
endp <- adls_endpoint("https://mystorage.dfs.core.windows.net/", key="access_key")

# list ADLSgen2 filesystems
list_adls_filesystems(endp)

# get, create, and delete a filesystem
adls_filesystem(endp, "myfs")
create_adls_filesystem(endp, "newfs")
delete_adls_filesystem(endp, "newfs")

# alternative way to do the same
adls_filesystem("https://mystorage.dfs.core.windows.net/myfs", key="access_key")
create_adls_filesystem("https://mystorage.dfs.core.windows.net/newfs", key="access_key")
delete_adls_filesystem("https://mystorage.dfs.core.windows.net/newfs", key="access_key")

# }

Run the code above in your browser using DataLab