if (fileOrDir != forbiddenPath) {
if (file.info(fileOrDir)$isdir) {
rFiles = list.files(fileOrDir, pattern="\\.[RrSsq]$",
- full.names=TRUE, recursive=TRUE)
+ full.names=TRUE, recursive=TRUE)
# NOTE: potential unexported functions are not hidden;
# the developer is assumed to handle this
lapply(rFiles, source)
# This file tells if the package is currently loaded
pkgLoadFile = file.path(pkdev_path,"pkgs",pkgName,"loaded")
-
+
if (file.exists(file.path(path,"src"))) {
# C code -- Warning: src/tests folder should not be listed
cFiles = c(
- list.files( file.path(path,"src","adapters"), pattern="\\.[cChH]$",
- full.names=TRUE, recursive=TRUE ),
- list.files( file.path(path,"src","sources"), pattern="\\.[cChH]$",
- full.names=TRUE, recursive=TRUE ))
-
+ list.files(file.path(path,"src","sources"),pattern="\\.[cChH]$",
+ full.names=TRUE, recursive=TRUE, no..=TRUE),
+ list.files(file.path(path,"src","adapters"),pattern="\\.[cChH]$",
+ full.names=TRUE, recursive=TRUE, no..=TRUE))
+
# Create folder R_HOME_USER/pkgdev/pkgs/pkgName/src (if not existing)
dir.create(file.path(pkdev_path,"pkgs",pkgName,"src"), showWarnings=FALSE)
}
# Mark package as 'loaded'
- writeLines("loaded",pkgLoadFile)
+ file.create(pkgLoadFile)
}
# Generate appropriate Makefile under R_HOME_USER/pkgdev/pkgs/pkgName/src