posStart()  readDir()

Chapter 5: General Objects and Methods

read()

Description

Reads the contents of a file associated with an I/O file object. This reads the contents of the file from the current offset for the number (num) of bytes, and places the bytes read into the buffer.

Syntax

read({blob | string} *buffer, int num);

Parameter

Description

buffer

Pointer to a string or blob buffer to hold the bytes read.

num

Integer that specifies the number of bytes to read.

Return value

Integer. Returns the number of bytes read, if successful, and -1, if failed.

Usage

Pointer to object

Object

blob buff;int num;num = 25;piof->read(&buff, int num)

string buffer;int number;number = 13;my_iofobj.read(&buffer, number);





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

View this book as PDF