No sorting needed, just maximum.
I find the functions below useful when working from REPL. This is my
.juliarc file. I tried to add documentation metadata to the function, but
it does not work with version checks.
````
println(".juliarc define function: lastfile() ")
"""
Name of last file in current directory
...
"""
function lastfile()
#Name of last file in current directory
rd=readdir(pwd())
rd[indmax(map(mtime,rd))]
end
if VERSION >= v"0.4.0-dev+6521"
println(" osol() osopen() on > 0.3.11")
"""
Windows or Mac, open the given file in current directory
...
"""
function osopen(filename::AbstractString)
# open the file on Mac or on Windows
@osx? run(`open $filename`) : spawn(`cmd /C "$filename"`)
end
"""
Windows or Mac, open the last file in current directory
...
"""
function osol()
filename=lastfile()
@osx? run(`open $filename`) : spawn(`cmd /C "$filename"`)
end
end
````