This function uses the system's file
command to determine the type of the
file specified by the Path
parameter. It returns a character string
describing the file type.
Note
This function relies on the system's file
command and therefore
might produce different outputs on different platforms.
Examples
(f <- system.file("ex/elev.tif", package="terra"))
#> [1] "/home/runner/work/_temp/Library/terra/ex/elev.tif"
FileType(Path = f)
#> [1] "TIFF image data, little-endian, direntries=19, height=90, bps=16, compression=LZW, PhotometricInterpretation=BlackIsZero, width=95"