16.03.2017, 17:30
Hello, I am working with the logic machine 5 and I want to do a test of reading and writing files through a USB, but the example I find is focused on linux, does it work with windows? Or does it have a different syntax?
Another question, this code
- create usb mount directory
The.execute ('mkdir -p / mnt / usb')
- find first matching usb storage device
Dev = io.readproc ('ls / dev / sd * 1 2> / dev / null'): match ('/ dev / sd% l1')
- found it, mount
If dev then
The.execute ('mount' .. dev .. '/ mnt / usb')
Alert ('[usb-mount] mounted% s', dev)
- nothing found, local flash will be used
Else
Alert ('[usb-mount] no device found')
End
Hurt directly in the script or would relate to common functions?
Thank you.
Another question, this code
- create usb mount directory
The.execute ('mkdir -p / mnt / usb')
- find first matching usb storage device
Dev = io.readproc ('ls / dev / sd * 1 2> / dev / null'): match ('/ dev / sd% l1')
- found it, mount
If dev then
The.execute ('mount' .. dev .. '/ mnt / usb')
Alert ('[usb-mount] mounted% s', dev)
- nothing found, local flash will be used
Else
Alert ('[usb-mount] no device found')
End
Hurt directly in the script or would relate to common functions?
Thank you.