volttron icon indicating copy to clipboard operation
volttron copied to clipboard

Accessing files outside of a volttron agent

Open lazlop opened this issue 2 years ago • 1 comments

I'm currently writing an agent that works with FMU files (using pyFMI), but I can't seem to access the FMU files. How can I allow a volttron agent to access a .fmu file by absolute path?

lazlop avatar Mar 04 '22 23:03 lazlop

This should be able to be done via the pathlib module.

from pathlib import Path

pth = Path('path').resolve(strict=True)  # strict resolves symlinks 

# this is now a Path object not a string if you need a string to pass to pyFMI you can use
str(pth)

craig8 avatar Mar 04 '22 23:03 craig8