read()  readFile()

Chapter 5: General Objects and Methods

readDir()

Description

Reads the files from the list generated by openDir(). readDir() takes the first file or directory in the internal list generated by OpenDir() method and associates the file or directory to the I/O file object in the file_obj parameter. Then, readDir() removes the first file or directory from the internal list and a subsequent call to readDir() associates the next file or directory in the internal list to file_obj. Each call to readDir() takes the file or directory in the internal list, associates it with file_obj, then removes the file or directory from the list. When no files/directories remain, readDir() returns a 0.

Syntax

readDir(clFile *file_obj);

Parameter

Description

file_obj

Pointer to the I/O file object to associate with the file or directory read from the list.

Return value

Integer. Returns the following if successful:

Returns 0, indicating that an error occurred or an absence of files in the list.

Usage

Pointer to object

Object

piof->readDir (&p_other_iof);

my_iofobj.readDir(&other_iofobj);





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

View this book as PDF