paste()  set()

Chapter 5: General Objects and Methods

save()

Description

Saves the contents of the blob to the file specified in the filename parameter. This method creates the file, if necessary. If a file with the same name currently exists, the save() method overwrites the contents of the existing file with the new information. To append to an existing file, use write().

Syntax

save(sring filename);

Parameter

Description

filename

A string that contains the name of the file to which the blob contents are saved. Can contain a drive and path designation, as well as the filename. All backslashes (\) must be escaped(\\).

Return value

Integer. Returns the number of bytes written to the file, if successful, and the negative value of the UNIX error that caused the method to fail, if failed.

Usage

Pointer to object

Object

pb->save(“./newfile.blo”);

myblob.save(“/tmp/newfile”);

pb->save    (“c:\\”+dir+”\\”+filename);

myblob.save(“c:\\”+dir+”\\”+filename);





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

View this book as PDF