Raspberry Pi system command.
Posted: Sat Oct 06, 2018 9:00 am
One for Raspberry Pi users:
Was thinking about unzipping a file on the Pi - using Flowcode.. That would be a big project and madness unless you had )a lots of time and b) someone was paying big bucks and c) lots of (hard) work.
So the easy way is to use someone else's code. The good news is that this is straightforward.
Use the 'system' command in a C macro.
So for example:
or
This only works for Pi users (at present) - where the underlying OS has commands available. To make things more general - build and use a string variable and then: (take a peek at the C code to get the variable names FC has used)
Martin
Was thinking about unzipping a file on the Pi - using Flowcode.. That would be a big project and madness unless you had )a lots of time and b) someone was paying big bucks and c) lots of (hard) work.
So the easy way is to use someone else's code. The good news is that this is straightforward.
Use the 'system' command in a C macro.
So for example:
Code: Select all
system("mkdir test"); // Create a new directory 'test'
Code: Select all
system("gunzip file.gz"); // Unzip file.gz
Code: Select all
system(FCV_S); // Use global string S as a command....