Description Usage Arguments Value Examples
Functions for directory operations
1 2 3 4 5 6 7 8 9 10 11 | getBasenamePrefix(filepath, words, ...)
getPathPrefix(filepath, words, ...)
checkFileExist(filePath, ...)
checkPathExist(filePath, ...)
checkFileCreatable(filePath, ...)
addFileSuffix(filePath, suffix, ...)
|
filepath |
|
words |
|
... |
Additional arguments, currently unused |
filePath |
|
suffix |
|
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. |
addFileSuffix |
(For package developer) Check if file suffix existed and add suffix |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.