Add File object from absolute path string
@ustk Could you explain this one a little more? Because I think you can already do this.
@d-healey Well, I'm trying for hours...
You can make a user selecting a custom directory for anything you want,
for instance "/Users/greg/Documents/myAwesomeLocation" just for the sake of the example
Then you can dump it let say in a pref file as an object parameter
Then at the next init when you recall the pref file, it is (at least for me) impossible to recreate the File object from this path string.
Well I say impossible but I found a way, but it's a bit dirty...
I split the path into substrings and recursively get the next childFile. But this means I need to begin somewhere I'm not really sure of. like root disk, and then add Users, then Documents, you get it...
If the user selects another directory that is not on the root disk, I have no proper way to know, and recall isn't possible.
Since JUCE already can create File from an absolute path with
File::File (const String & absolutePath)
I'm trying to just implement it but with no success for now...
The problem is that absolute paths do not translate well across different operating systems so if you can achieve what you want with relative paths, it should be more robust.
@Christoph-Hart Well Documents was just an example, the user can choose whatever he wants and I have no ways to know...
Then use the FileSystem.browse method?
@Christoph-Hart The fact is that I don't fix the path myself so cross-compatibility isn't an issue here. It is the user who just set his path preferences, he won't copy the pref file to another computer...
This is what I do for now...
I get the problem now.
Why not dump it to the appData folder instead of asking the user where they want it?
@d-healey In fact it is for a customizable VST folder, so the user decides... Thus, the absolute path ;)