477
TIDE and Tibbo BASIC User Manual
©2000-2008 Tibbo Technology Inc.
Details
method to mount this disk.
.Rename Method
Function:
Renames a file specified by its name.
Syntax:
fd.create(byref old_name as string, byref new_name
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: Old_name is a NULL
string, which is not allowed.
5- PL_FD_STATUS_DUPLICATE_NAME: File with the
new_name already exists.
8- PL_FD_STATUS_NOT_READY: The disk is not mounted.
9- PL_FD_STATUS_NOT_FOUND: The old_name file is not
found.
See Also:
Creating Deleting, and Renaming Files
,
Part
Description
old_
nam
e
A string (1-56 characters) with the name of the file to be renamed. All
characters after the first space encountered (excluding leading spaces)
will be ignored. File names are case-sensitive.
new
_na
me
A string (1-56 characters) with the new name for the file. All characters
after the first space encountered (excluding leading spaces) will be
ignored.
Details
A file can always be renamed, even if this file is currently opened.
The file with the old_name name must be present on the disk, or you will get the
9- PL_FD_STATUS_NOT_FOUND status code. The new_name name must contain at
least one character, or 4- PL_FD_STATUS_INV_PARAM code will be returned. The
new_name name must be unique, i.e. a file with the same name must not be
present on the disk, otherwise the 5- PL_FD_STATUS_DUPLICATE_NAME status
code will be generated. 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.
474
472
472
441
440