vsi_get_file_metadata | R Documentation |
vsi_get_file_metadata()
returns metadata for file system objects.
Implemented for network-like filesystems. Starting with GDAL 3.7,
implemented for /vsizip/ with SOZip metadata.
Wrapper of VSIGetFileMetadata()
in the GDAL Common Portability Library.
vsi_get_file_metadata(filename, domain)
filename |
Character string. The path of the file system object to be queried. |
domain |
Character string. Metadata domain to query. Depends on the file system, see Details. |
The metadata available depends on the file system. The following are supported as of GDAL 3.9:
HEADERS: to get HTTP headers for network-like filesystems (/vsicurl/, /vsis3/, /vsgis/, etc).
TAGS: for /vsis3/, to get S3 Object tagging information. For /vsiaz/, to get blob tags.
STATUS: specific to /vsiadls/: returns all system-defined properties for a path (seems in practice to be a subset of HEADERS).
ACL: specific to /vsiadls/ and /vsigs/: returns the access control list
for a path. For /vsigs/, a single XML=xml_content
string is returned.
METADATA: specific to /vsiaz/: blob metadata (this will be a subset of
what domain=HEADERS
returns).
ZIP: specific to /vsizip/: to obtain ZIP specific metadata, in
particular if a file is SOZIP-enabled (SOZIP_VALID=YES
).
A named list of values, or NULL
in case of error or empty list.
vsi_stat()
, addFilesInZip()
# validate an SOZip-enabled file
# Requires GDAL >= 3.7
f <- system.file("extdata/ynp_features.zip", package = "gdalraster")
zf <- file.path("/vsizip", f)
# files in zip archive
vsi_read_dir(zf)
# SOZip metadata for ynp_features.gpkg
zf_gpkg <- file.path(zf, "ynp_features.gpkg")
vsi_get_file_metadata(zf_gpkg, domain = "ZIP")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.