Hello,
I have a package with directories structured like this:
- Packgage
- data
- datafile.txt
- src
- package.jl
- data
In package.jl, there is a function
function foo()
f = read("data/datafile.txt")
#do smth
end
This works fine when I am working in the Julia environment “Package”, but I would like someone to be able to add Package
, using Package
, Package.foo()
.
But in that case, they obtain a SystemError: opening file "data/datafile.txt": No such file
This is because they are in another environment than that of the package. Is there a way to tell Julia to use paths that are within the package?