open()  pos()

Chapter 5: General Objects and Methods

openDir()

Description

Opens the directory associated with the I/O file object and creates an internal listing of the contents.

Syntax

openDir(string mask);

Parameter

Description

mask

UNIX regular expression that identifies the files or directories to place in the internal listing. To place all the associated directory contents into the internal listing, use double quotes (“_”) as the mask.

Return value

Integer. Returns the number of items placed into the internal listing, if successful, and -1, if failed.

Usage

Commands

Command Modifiers

.(any character)

*(none or more)

[(character list)

+(one or more)

[^(not in list)

{m,n} {range}

$(end of match)

Pointer to object

Object

piof->openDir(“P[a-z]”);

myiofobj.openDir(““);

Examples

Example 53

string mymask;
mymask = “[a-d]”;
mymask = “[^a-d]”;
mymask = “.[m-p]”
mymask = “sybs$”
mymask = “a[a-z].*001




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

View this book as PDF