mountpoint: Return the mountpoint of the input directory (if it is...

View source: R/mountpoint.R

mountpointR Documentation

Return the mountpoint of the input directory (if it is mounted)

Description

The function checks if the input directory is a subdirectory of a mountpoint of a certain protocol. At the moment, it works only on unix operating systems.

Usage

mountpoint(path, protocol = NA)

Arguments

path

The path to be checked

protocol

(optional) Vector of protocol types. If NA (default), all the protocols are considered.

Value

The path of the parent mountpoint for mounted directories; if the input directory is not mounted, NULL is returned. NULL is returned also if the operating system is not unix (together with a warning message). An attribute "protocol" contains the protocol of the mountpoint.

Note

License: GPL 3.0

Author(s)

Luigi Ranghetti, phD (2019)

References

L. Ranghetti, M. Boschetti, F. Nutini, L. Busetto (2020). "sen2r": An R toolbox for automatically downloading and preprocessing Sentinel-2 satellite data. Computers & Geosciences, 139, 104473. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.cageo.2020.104473")}, URL: https://sen2r.ranghetti.info/.


sen2r documentation built on Nov. 10, 2023, 9:08 a.m.