0

I have successfully compiled my .erl files and now the .beam files are lying down in my working directory. However, for some reason I need to access those files from another directory... more specifically from the parent directory. The hierarchy is : ...\wkdir\ebin\beam_example.beam, and I wish to access the beam_example.beam from wkdir. Is it possible to do this?

Also, I'm using escript, so a valid import may be very likely to solve this problem, though I just can't figure that out.

Chien
  • 355
  • 2
  • 11
  • 1
    See [this answer](https://stackoverflow.com/a/6545694) if you're looking for a way to add a code path relative to where your escript is stored. – Steve Vinoski Jul 20 '20 at 15:32

1 Answers1

0

You can modify the search path for the .beam with the code:add_path* methods. If the code server is in interactive mode (it should be), that'd be enough for the VM to locate the module files and load them lazily.

José M
  • 3,294
  • 1
  • 14
  • 16