Load file to and from local file system

How does one load and save a text file to a specifc location on the local file system?

I noticed DownloadTextFile but this downloads to the downloads directory and it ignores any path information.

Is there a way to save a text file (json string to be specific) to a user specified location?

And for the converse, is there a way to load a text file from a user specified location? 

I tried TStringlist but that doesn't appear to take a path. 

It looks like TWebFilePicker will  let me load a text file but what about saving? Also TWebFilePicker appears to be a button control?

That is not automatically possible.

Reflect on how big a security breach that would be if a web application could do that.
1) For a regular download link, your browser should give you the ability to browse for the download location
2) With the TWebFilePicker you can load local files

Bruno Fierens2020-05-28 08:47:50

You're right I hadn't thought of that. after checking even google docs only let's you download files to the downloads directory. Thanks for the clarrification.