| Utils {pipeFrame} | R Documentation |
Functions for directory operations
getBasenamePrefix(filepath, words, ...) getPathPrefix(filepath, words, ...) checkFileExist(filePath, ...) checkPathExist(filePath, ...) checkFileCreatable(filePath, ...)
filepath |
|
words |
|
... |
Additional arguments, currently unused |
filePath |
|
getBasenamePrefix |
Get the filepath basename with removed suffix |
getPathPrefix |
Get the filepath with removed suffix |
checkFileExist |
(For package developer) Check file is exist. |
checkPathExist |
(For package developer) Check directory is exist. |
checkFileCreatable |
(For package developer) Check file creatable. |
getBasenamePrefix("aaa/bbb.ccc.ddd","cCc")
getBasenamePrefix("aaa/bbb.ccc.ddd","ddd")
getPathPrefix("aaa/bbb.ccc.ddd","dDd")
getPathPrefix("aaa/bbb.ccc.ddd","ccc")
file.create("test.bed")
checkFileExist("test.bed")
tryCatch({checkFileExist("test.bed1")},error = function(e) e)
dir.create("testdir")
checkPathExist(file.path(getwd(),"testdir"))
tryCatch({checkPathExist(file.path(dirname(getwd()),
"notexistfolder","testdir"))},error = function(e) e)
checkFileCreatable("aaa.bed")
tryCatch({checkFileCreatable("testdir1/aaa.bed")},error = function(e) e)