O'Reilly logo

APIs at Work, Second Edition by Ron Hawkins, Doug Pence, Bruce Vining

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Opening an Integrated File System Stream File

The first API we will look at is the open API. You can think of this API as being loosely equivalent to the RPG F-spec, although the API gives you options you won’t find on the F-spec! The parameter descriptions for open are shown in Figure 14.1.

Figure 14.1. The open API.
int open (const char *path, int oflag, ...)

As you learned in chapter 1 and further examined in chapter 9, this style of parameter description defines the open API as having two required parameters (Path and Oflag), some number of optional parameters (indicated by the ellipsis, ...) that are further described in the API documentation, and an integer return value (also further described in the API documentation).

The first parameter, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required