
74
Class Reference
Example:
name = storage.findNext();
Sets
name
to the name of the next time card record file.
4.4.1.5
read
The storage.read method reads a file.
Format and Example:
data = storage.read(name);
Where:
name
– string; the
name
of a file.
data
– string; the contents of the file;
null
if there was no file with that name.
Sets
data
to the contents of the time card record specified by
name
.
4.4.1.6
rename
The
storage.rename
method renames a file.
Format and Example:
ok = storage.rename(oldName, newName);
Where:
oldName
– string; the name of a file to rename.
newName
– string; the name of the file after rename.
ok
– bool; success or failure of the renaming.
Sets
ok
to true or false. The file
oldName
is renamed to
newName
if return is
true
.
4.4.1.7
size
The storage.size method returns the size of a file in bytes.
Format and Example:
nameSize = storage.size(name);
Where:
name
– string; the name of a file.
nameSize
– integer; the size of the file in bytes.
Sets
nameSize
to the size of the time card record specified by
name
.
4.4.1.8
upload
The
storage.upload
method uploads a file to the host over the current active host
comm port.