R/raw.checkNoSubfolders.R

Defines functions raw.checkNoSubfolders

Documented in raw.checkNoSubfolders

#' Subfolders in RAW path
#'
#' The RAW path should not contain subfolders; the reason for
#' this is that subfolders tend to have additional information in
#' the folder name, which then makes the file less unique.
#'
#' @param pfad path to the RAW folder
#' @return \code{TRUE} if there are no subfolders
#' @examples
#' raw.checkNoSubfolders(raw.getSamplePath())
#' @export
raw.checkNoSubfolders <- function(pfad) {
  if(!dir.exists(pfad)) { warning(paste('Data folder',pfad,'not found.'))  }
  (length(list.dirs(pfad)) == 1)
}
thomasgredig/RAWdataR documentation built on Nov. 6, 2024, 9:46 a.m.