462
Platforms
©2000-2008 Tibbo Technology Inc.
.Create Method
Function:
Creates a new file with the specified name and
attributes.
Syntax:
fd.create(byref name_attr as string) as
pl_fd_status_codes
Returns:
One of the following
, also affects
:
0- PL_FD_STATUS_OK: Completed successfully.
1- PL_FD_STATUS_FAIL : Physical flash memory failure
(fatal).
2- PL_FD_STATUS_CHECKSUM_ERR: Checksum error has
been detected in one of the disk sectors (fatal).
4- PL_FD_STATUS_INV_PARAM: Invalid argument have
been provided.
5- PL_FD_STATUS_DUPLICATE_NAME: File with this
name already exists.
6- PL_FD_STATUS_FILE_TABLE_FULL: Maximum number
of files that can be stored on the disk has been reached,
new file cannot be created.
7- PL_FD_STATUS_DATA_FULL: The disk is full, new data
cannot be added.
8- PL_FD_STATUS_NOT_READY: The disk is not mounted.
See Also:
Par
t
Description
na
me
_at
tr
A string (1-56 characters), must contain a file name and, optionally,
attributes separated from the file name by a space. File names are case-
sensitive.
Details
The file_attr string will always be truncated to 56 characters. Leading spaces will
be removed. The file name must contain at least one character, or 4-
PL_FD_STATUS_INV_PARAM code will be returned. The file name must be unique,
attempting to create another file with the same name will lead to the 5-
PL_FD_STATUS_DUPLICATE_NAME status code. Note that only the name must be
unique, the attributes can be the same for several files on the disk. Any character
except space can be used in file names. This includes "/" and "\". The flash disk
does not support subdirectories, but it is possible to emulate them by including "/"
or "\" characters in the file name. The attributes portion of the string may contain
any characters whatsoever.
The flash disk can accommodate a limited number of files, which is determined
during the formatting (see
) and can be checked through the
R/O property. Attempting to create another file when the
maximum number of stored files has already been reached will result in the 6-
PL_FD_STATUS_FILE_TABLE_FULL status code.
472
472
441
467
474