29
3.7
USING THE MASS STORAGE DEVICE
In addition to providing non-volatile storage of scripts, the mass storage device (ordering option
-0003 only) provides the user with a large amount of non-volatile memory for storage of user
data. The EM405-8 system only uses the mass storage device for the script pool. The remainder
of the device is available for user data.
Scripts can store and retrieve data to/from the mass storage device using the standard file I/O
functions found in the Lua I/O Library. The mass storage device is mapped to the directory
/media
. A single subdirectory
/media/scripts
is created by the system for the script pool.
Care should be taken not to overwrite or erase the script pool. If desired, the user can create
subdirectories from the Interactive Mode of the scripting socket or from within a script using the
execute
function in the Lua Operating System Library as show in the following example:
os.execute(“mkdir /media/userdir”)