Example for FilePicker to save a file?

I’d like to use the FilePicker element to save a csv file generated from my Grasshopper definition. I can change the FilePicker dialog box type to “Save File” but this returns the path chosen without actually saving anything.

I would like to either:

  1. Save the file when the FilePicker element button is pushed
  2. Or push a True value when the FilePicker button is pushed so I can attach this to a separate python script to actually write the file.

I don’t think I’m using this element correctly, could someone provide an example of how you would use it to save something? Thank you!