There's a @__FILE__ macro that gives the path name of the current source file, so if you want to load resources relative to that, you can do joinpath(dirname(@__FILE__), "test", "data"). We might want to expose this as @__DIR__ or something like that.
On Mon, Apr 20, 2015 at 5:50 PM, Michael Francis <[email protected]> wrote: > I'd like to load some local files from a module package directory. This is > akin to the way java has resources. If this were julia code I could just > include( 'foo.jl' ) and that will do mostly the right thing. Is there an > equivalent without having to perform string math on Pkg.dir() ... > > I've seen the following in DataFrames - Is this the idiomatic way > > cd(Pkg.dir("DataFrames", "test", "data")) do ... and then perform file > reads ? > > Thanks > >
