Is there any function equivalent to "dir" in MATLAB?

Is there any function equivalent to dir in MATLAB; that shows {name, folder, date, bytes, isdir, datenum}?

You can use the shell mode to execute any system command. Just type semicolon ;, REPL prompt will change to shell.

1 Like

I don’t know of anything that comes in the same form, but you can grab a lot of the relevant info with stat(filename), and enumerating the files in a directory can be done with readdir(). Putting the two together:

julia> cd("/usr/bin")

julia> info = Dict(f => stat(f) for f in readdir())
Dict{String,Base.Filesystem.StatStruct} with 2 entries:
  ""            => StatStruct(mode=0o100755, size=3221912)
  "["                  => StatStruct(mode=0o100755, size=55232)
  â‹®                   => â‹®

julia> info["ls"].size
1 Like

Looks like MatlabCompat.jl would be a good place for this, but unfortunately it doesn’t seem to be actively developed.

Maybe that’s a good sign, because that means users don’t really need it and are happily transitioning to Julia language