Sorry to resurrect this issue, but I was playing around and came up with the
following function to accomplish what we want.
function runfile(file::String)
flag = true # changes to false if the file is found
for dir in [pwd(), LOAD_PATH...]
dfile = joinpath(dir,file)
if isfile(dfile)
include_string(readall(dfile))
flag = false
break
end
end
if flag error("Error: could not open $file") end
end
This works right? Am I missing anything subtle about it's behavior? In
particular, I want it to work like "include" but checks LOAD_PATH if it can't
find the file in the working directy?
Cheers,
Ethan