readFile()  size()

Chapter 5: General Objects and Methods

rename()

Description

Renames the I/O file object associated file.

Syntax

rename(string newName);
rename(blob *newName);
rename(string newName, int flag);
rename(blob *newName, int flag);

Parameter

Description

newName

The string or blob that contains the name of the new file.

flag (optional)

Flag to specify rename operations:

  • Set to 1 to specify that if a rename fails, then attempt the copying of the associated file to the new name.

  • Do not set, or set to 0 to instruct the program to not attempt the copy of the associated file if the rename fails.

Return value

Integer. Returns 1 for success, and 0 for failure.

Usage

Pointer to object

Object

piof->rename(“oldstuff”, 1);

string newName;newName = “acct_data”;my_iofobj.rename(newName);





Copyright © 2005. Sybase Inc. All rights reserved. size()

View this book as PDF