Learn R Programming

gdalraster (version 1.11.1)

vsi_set_path_option: Set a path specific option for a given path prefix

Description

vsi_set_path_option() sets a path specific option for a given path prefix. Such an option is typically, but not limited to, setting credentials for a virtual file system. Wrapper for VSISetPathSpecificOption() in the GDAL Common Portability Library. Requires GDAL >= 3.6.

Usage

vsi_set_path_option(path_prefix, key, value)

Value

No return value, called for side effect.

Arguments

path_prefix

Character string. A path prefix of a virtual file system handler. Typically of the form /vsiXXX/bucket.

key

Character string. Option key.

value

Character string. Option value. Passing value = "" (empty string) will unset a value previously set by vsi_set_path_option().

Details

Options may also be set with set_config_option(), but vsi_set_path_option() allows specifying them with a granularity at the level of a file path. This makes it easier if using the same virtual file system but with different credentials (e.g., different credentials for buckets "/vsis3/foo" and "/vsis3/bar"). This is supported for the following virtual file systems: /vsis3/, /vsigs/, /vsiaz/, /vsioss/, /vsiwebhdfs, /vsiswift.

See Also

set_config_option(), vsi_clear_path_options()