Integrated File System APIs

The integrated file system APIs can perform operations on directories, files, and related objects in the file systems accessed through the integrated file system interface.

The table below lists the integrated file system functions and what they do.

Integrated File System Functions
Function Description
access() Determine file accessibility
chdir() Change current directory
chmod() Change file authorizations
chown() Change owner and group of file
close() Close file descriptor
closedir() Close directory
creat() Create new file or rewrite existing file
creat64() Create new file or rewrite existing file (large file enabled)
DosSetFileLocks() Lock and unlock a range of an open file
DosSetFileLocks64() Lock and unlock a range of an open file (large file enabled)
DosSetRelMaxFH() Change maximum number of file descriptors
dup() Duplicate open file descriptor
dup2() Duplicate open file descriptor to another descriptor
fchmod() Change file authorizations by descriptor
fchown() Change owner and group of file by descriptor
fcntl() Perform file control command
fpathconf() Get configurable path name variables by descriptor
fstat() Get file information by descriptor
fstat64() Get file information by descriptor (large file enabled)
fstatvfs() Get information about file system by descriptor
fstatvfs64() Get file system information by descriptor (64-bit enabled)
fsync() Synchronize changes to file
ftruncate() Truncate file
ftruncate64() Truncate file (large file enabled)
getcwd() Get path name of current directory
getegid Get effective group ID
geteuid() Get effective user ID
getgid() Get real group ID
getgrgid() Get group information using group ID
getgrgid_r() Get group information using group ID
getgrnam() Get group information using group name
getgrnam_r() Get group information using group name
getgroups() Get group IDs
getpwnam() Get user information for user name
getpwnam_r() Get user information for user name
getpwuid() Get user information for user ID
getpwuid_r() Get user information for user ID
getuid() Get real user ID
ioctl() Perform file I/O control request
Start of changelchown() Change owner and group of symbolic linkEnd of change
link() Create link to file
lseek() Set file read/write offset
lseek64() Set file read/write offset (large file enabled)
lstat() Get file or link information
lstat64() Get file or link information (large file enabled)
mkdir() Make directory
open() Open file
open64() Open file (large file enabled)
opendir() Open directory
pathconf() Get configurable path name variables
QP0LFLOP Perform file system operation
Qp0lCvtPathToQSYSObjName() Resolve integrated file system path name into QSYS object name
Qp0lGetAttr() Get Attributes
Qp0lGetPathFromFileID() Get path name of object from its file ID
Qp0lOpen() Open file
Qp0lProcessSubtree() Process a Path Name
Qp0lRenameKeep() Rename file or directory, keep new if it exists
Qp0lRenameUnlink() Rename file or directory, unlink new if it exists
Qp0lSetAttr() Set Attributes
Qp0lUnlink() Remove Link to File
QZNFRTVE Retrieve network file system export entries
Start of changeqsysetegid() Set effective group IDEnd of change
Start of changeqsyseteuid() Set effective user IDEnd of change
Start of changeqsysetgid() Set group IDEnd of change
Start of changeqsysetregid() Set real and effective group IDsEnd of change
Start of changeqsysetreuid() Set real and effective user IDsEnd of change
Start of changeqsysetuid() Set user IDEnd of change
read() Read from file
readdir() Read directory entry
readdir_r() Read directory entry
readlink() Read value of symbolic link
readv() Read from file (vector)
rename() Rename file or directory.

Can be defined to have the semantics of Qp0lRenameKeep() or Qp0lRenameUnlink().

rewinddir() Reset directory stream
rmdir() Remove directory
stat() Get file information
stat64() Get file information (large file enabled)
statvfs() Get file system information
statvfs64() Get file system information (large file enabled)
symlink() Make symbolic link
sysconf() Get system configuration variables
umask() Set authorization mask for job
unlink() Remove link to file
utime() Set file access and modification times
write() Write to file
writev() Write to file (vector)

In addition to the functions above, the following functions, which are described in the Sockets APIs, can also operate on files in the integrated file system.

Figure 1-2. Other Functions that Operate on Files
Function Description
givedescriptor() Give file access to another job

Give socket access to another job

select() Check I/O status of multiple file descriptors

Wait for events on multiple sockets

takedescriptor() Take file access from another job

Take socket access from another job

Note: These functions use header (include) files from the library QSYSINC, which is optionally installable. Make sure QSYSINC is installed on your system before using any of the functions. See for the file and member name of each header file.

Many of the terms used in this chapter, such as current directory, file system, path name, and link, are explained in the Integrated File System Introduction book. An appendix in this book also shows an example of using several integrated file system functions.

The following descriptions of the functions are organized in alphabetical order by function name.

To determine whether a particular function updates the access, change, and modification times of the object on which it performs an operation, see Integrated File System APIs--Time Stamp Updates.

Integrated File System Exit Program

This page also includes information about an exit program, which must be provided by the user.

The Process a Path Name exit program is called by the Qp0lProcessSubtree() API for each object in the API's search which meets the caller's selection criteria.


Top | UNIX-Type APIs | APIs by category


[Information Center Home Page | Feedback ] [Legal | AS/400 Glossary]