R/aaa_utils.R

Defines functions nii_fname

nii_fname = function(fname) {
  gz = grepl("[.]gz$", tolower(fname))
  if (any(gz)) {
    fname[gz] = sapply(
      fname[gz],
      R.utils::gunzip,
      temporary = TRUE,
      overwrite = TRUE,
      remove = FALSE)
  }
  return(fname)
}
muschellij2/cifti documentation built on May 25, 2018, 6:29 p.m.