Well I only included the module side as that was what you’re example was doing. Why were you using a module in the first place?
You can get the path string from anywhere - hard-code it, from a variable, from a table, from a variable within another module, from a table within another module, from a variable nested 12 modules down, from a network call, from a text file - it’s up to you. Whatever fits the way you want to build your app.