Raspberrypi: How to Save file to USB stick

I would like to use a program based on the ofxRPiCameraVideoGrabber but save the video to a USB stick.

How can one set the location of a file that is being saved. I don’t really see discussions online for any version of OF except android and iOS…

An answer does not have to be specific to a RPi, but would be handy…

as long as the usb drive is mounted correctly you should be able to pass in an absolute path to it. WIth ofxRPICameraVideoGrabber it is set in omxCameraSettings.recordingFilePath

e.g.

omxCameraSettings.recordingFilePath = "/media/usb/output.h264";

thank you. I was going to try an alternative method by copying the binary of the program onto the usb drive and letting it figure out the location when I run it…