Metrologic Optimus S Programming Manual page 193

"c" programming guide
Table of Contents

Advertisement

If successful, it returns 1.
Return
On error, it returns 0.
An error code is set to the global variable fErrorCode to indicate the error
condition encountered. Below are possible error codes and their interpretation.
Error Code
1
2
10
rename
Purpose
To change the file name of an existing file.
Syntax
int rename (char *old_filename, char *new_filename);
char *old_filename;
char *new_filename;
Example
if (rename ("data1", "text1")) puts ("data1 is renamed!\n");
This routine changes the file name specified by the argument old_filename to
Description
new_filename.
Return
If successful, it returns 1.
On error, it returns 0.
An error code is set to the global variable fErrorCode to indicate the error
condition encountered. Below are possible error codes and their interpretation.
Error Code
1
2
3
Chapter 3 Terminal Specific Function Library
If the file to be deleted is a DBF file, the DBF file and all the index (key)
files associated to it will be deleted together.
Interpretation
filename is a NULL string.
File specified by filename does not exist.
Not enough free block.
If any of the two file name exceeds eight characters, it will be truncated to
eight characters.
If the file specified by old_filename is a DBF file, the file name of the
DBF file and all the index (key) files associated to it will be changed to
new_filename together.
Interpretation
filename is a NULL string.
File specified by filename does not exist.
A file named by new_filename already
exists.
/* name of the file to be renamed */
/* new file name desired */
187

Advertisement

Table of Contents
loading

This manual is also suitable for:

Optimus r

Table of Contents