Return the newest file from a vector of files
newestFile(x, timecol = "mtime", n = 1, ...)
character
vector of files, specifying file path where
required.
character
value from the output of base::file.info()
indicating the time column used to order files. By default "mtime"
refers to the time the file was last modified.
integer
number of files to return, in order of the most
recent to the least recent. By default n=1
returns only the one
newest file.
additional parameters are ignored.
Character vector length=1
of the most recently modified file
from the input vector x
. Note that any files not found are removed,
using base::file.exists()
.
This function returns the newest file, defined by the most
recently modified time obtained from base::file.info()
.
Other jam practical functions:
breakDensity()
,
checkLightMode()
,
check_pkg_installed()
,
colNum2excelName()
,
color_dither()
,
diff_functions()
,
exp2signed()
,
fileInfo()
,
fixYellow()
,
getAxisLabel()
,
handleArgsText()
,
heads()
,
isFALSEV()
,
isTRUEV()
,
jamba
,
jargs()
,
kable_coloring()
,
lldf()
,
log2signed()
,
make_html_styles()
,
make_styles()
,
match_unique()
,
mergeAllXY()
,
middle()
,
minorLogTicks()
,
printDebug()
,
renameColumn()
,
rmInfinite()
,
rmNAs()
,
rmNA()
,
rmNULL()
,
sclass()
,
sdim()
,
setPrompt()
newestFile(list.files());
#> [1] "nameVectorN.html"