I can import a file into the Julia environment with
include("path/file.jl"). Is it possible to include all the files present in “path”?
include("path/*.jl") does not work…
You could use
include.(filter(contains(r".jl$"), readdir(dir; join=true)))
which lists the absolute pathes of all files in
dir, filters for files with end with
.jl and includes them one by one.
For a wildcard-based solution (and if you’re willing to add a dependency for this), you can use the
foreach(include, glob("*.jl", dir))
Note that this works only if the files are independent since the order of the includes may vary between systems. To save you future headache I suggest that you list the includes explicitly.