21.03.2017, 14:59
Good morning, I have a problem, use this code, but even without the usb it appears that it is connected. My question is how do I place the USB location?
I'm working it this way...
path = 'mnt/PalominoSyT'
if io.exists(path) then
os.execute('mount' .. path .. ' /mnt')
alert('USB mont')
else
alert('USB not found')
end
path = '/mnt'
status = io.exists(path)
io.writefile(path .. 'new.txt', 'This is a test')
result = io.readfile(path .. 'new.txt')
lea = io.readfile('TestLMUsb.txt')
log(status, result, lea)
I'm working it this way...
path = 'mnt/PalominoSyT'
if io.exists(path) then
os.execute('mount' .. path .. ' /mnt')
alert('USB mont')
else
alert('USB not found')
end
path = '/mnt'
status = io.exists(path)
io.writefile(path .. 'new.txt', 'This is a test')
result = io.readfile(path .. 'new.txt')
lea = io.readfile('TestLMUsb.txt')
log(status, result, lea)