Note that in the current implementation, the case of the filepath and the extension must match.
readable.volume(
filepath,
precedence = c(".mgh", ".mgz"),
error_if_none = TRUE,
return_all = FALSE
)
character string, path to a file without extension
vector of character strings, the file extensions to check.
logical, whether to raise an error if none of the files exist
logical, whether to return all readable files instead of just the first one
character string, the path to the first existing file (or NULL if none of them exists).