vsi_is_local()
returns whether the file/filesystem is "local".
Wrapper for VSIIsLocal()
in the GDAL API. Requires GDAL >= 3.6.
Note
The concept of local is mostly by opposition with a network / remote file system whose access time can be long.
/vsimem/ is considered to be a local file system, although a non-persistent one.
Examples
# Requires GDAL >= 3.6
if (gdal_version_num() >= gdal_compute_version(3, 6, 0))
print(vsi_is_local("/vsimem/test-mem-file.tif"))
#> [1] TRUE