Integrated file system APIs

Use this table as a quick reference for UNIX-type optical file system APIs.

Like all file systems, the optical file system has unique rules and restrictions for applications that access optical functions through the integrated file system. Several of the UNIX-type APIs and generic commands are not supported. Others are only partially supported, or restricted.

Review the following tables to better understand supported and unsupported APIs and commands.

Table 1. Optical implementation of UNIX-type APIs
UNIX-type API Supported Comments and usage notes
access (Determine File Accessibility) Yes Requires *X authority to the parent optical volume. For non-Universal Disk Format (UDF) volumes, no other authority is required. For UDF formatted volumes, the following authorization rules apply:
  • Requires *X authority to each directory in the path preceding the object tested.
  • Requires *R authority when R_OK is specified.
  • Requires *W authority when W_OK is specified.
  • Requires *X authority when X_OK is specified.
  • Requires *RX authority when R_OK|X_OK is specified.
  • Requires *WX authority when W_OK|X_OK is specified.
  • Requires *RX authority when R_OK|W_OK is specified.
  • Requires no authority when F_OK is specified.
accessx (Determine File accessibility based on the who parameter) Yes Does not require *X authority to the parent optical volume. For UDF volumes, the following authorization rules apply:
Valid values for the who parameter are:
  • ACC_INVOKER
  • ACC_SELF
  • ACC_ALL
  • ACC_OTHERS
  1. Requires *R authority when R_OK is specified
  2. Requires *W authority when W_OK is specified
  3. Requires *X authority when X_OK is specified

Authority checks are mutually exclusive.

chdir (Change Current Directory) Yes Requires *X authority to the parent optical volume.

For non-UDF volumes, no other authority is required.

For UDF formatted volumes, *X authority is required to each directory in the path

chmod (Change File Authorizations) Yes Only supported for UDF formatted optical volumes. Requires *CHANGE authority to the parent optical volume. Requires *X authority to each directory in the path preceding the object. To perform this operation, you must be the owner of the file or have *ALLOBJ special authority.
chown (Change Owner and Group of File) Yes Only supported for UDF formatted optical volumes. Requires *CHANGE authority to the parent optical volume. Requires *X authority to each directory in the path preceding the object. To perform this operation, you must be the owner of the file, or have *ALLOBJ special authority. Files and directories on non-UDF formatted volumes are owned by QDFTOWN user profile.
close (Close File Descriptor) Yes  
closedir (Close Directory) Yes  
creat (Create or Rewrite File) Yes Requires *CHANGE authority to the parent optical volume. For non-UDF volumes, no other authority is required. For UDF formatted volumes, *X authority is required to each directory in the path and *WX authority to the parent directory.

The change and modification time stamps for the parent directory are not updated.

dup (Duplicate Open File Descriptor) Yes  
dup2 (Duplicate Open File Descriptor to Another Descriptor) Yes  
fchmod (Change File Authorizations by Descriptor) Yes Only supported for UDF formatted optical volumes. To perform this operation, you must be the owner of the file or have *ALLOBJ special authority.
fchown (Change Owner and Group of File by Descriptor) Yes Only supported for UDF formatted optical volumes. To perform this operation, you must be the owner of the file or have *ALLOBJ special authority. Files and directories on non-UDF formatted volumes are owned by QDFTOWN user profile.
fcntl (Perform File Control Command) No  
fpathconf (Get Configurable Path Name Variables by Descriptor) Yes  
fstat (Get File Information by Descriptor) Yes Owner, group, and other mode bits are always on, regardless of the user's authority to the file.

File access time stamp is not changed.

fsync (Synchronize Changes to File) Yes For UDF formatted volumes, data is forced to optical disk. For non-UDF formatted volumes, data is forced to internal disk storage that is recoverable through held optical files.
ftruncate (Truncate File) Yes  
getcwd (Get Current® Directory) Yes Requires *X authority to the parent optical volume. For non-UDF volumes, no other authority is required. For UDF formatted volumes, *RX authority is required to each directory in the path name preceding the object.
getegid Yes  
geteuid Yes  
getgid Yes  
getgrid Yes  
getgrnam Yes  
getgroups Yes  
getpwnam Yes  
getpwuid Yes  
getuid Yes  
ioctl (Perform File I/O Control Request) No  
link (Create Link to File) No QOPT does not support links.
lseek (Get File Read/Write Offset) Yes  
lstat (Get File or Link Information) Yes File access time stamp is not changed.

Requires *X authority to the parent optical volume. For non-UDF volumes, no other authority is required. For UDF formatted volumes, *X authority is required to each directory in the path preceding the object and *R authority is required to the object.

mkdir (Make Directory) Yes Requires *CHANGE authority to the parent optical volume. For non-UDF volumes, no other authority is required. For UDF formatted volumes, *X authority is required to each directory in the path and *WX authority to the parent directory.

The change and modification time stamps for the parent directory are not updated.

Owner ID and group ID are not set.

open (Open File) Yes If the file is opened for write access , *CHANGE authority is required to the parent optical volume.

If the file is opened for read access, *USE authority is required to the parent optical volume.

For UDF formatted volumes, the following additional authorization rules apply:
  • Requires *R authority when object is being opened O_RDONLY.
  • Requires *W authority when object is being opened O_WRONLY.
  • Requires *RW authority when object is being opened O_RDWR.
  • Requires *WX to the parent directory when object does not exist and O_CREAT is specified.
opendir (Open Directory) Yes Requires *USE authority to the parent optical volume.

For UDF formatted volumes, *X authority is required to each directory in the path preceding the object, and *R authority is required to the object being opened.

pathconf (Get Configuration Path Name Variables) Yes  
Qp0lGetPathFromFileId Yes  
Qp0lRenameKeep Partial QOPT does not support renaming a directory. The object must be a file.

Requires *CHANGE authority to the parent optical volume. For non-UDF volumes, no other authority is required. UDF formatted volumes require *X authority to each directory in the path, and *WX authority to the parent directory, and *W authority to the file. If renaming the volume, *RWX is required to the root (/) directory of the volume.

New and old files must exist in the same directory.

Qp0lRenameUnLink Partial QOPT does not support renaming a directory. The object must be a file.

Requires *CHANGE authority to the parent optical volume. For non-UDF volumes, no other authority is required. UDF formatted volumes require *X authority to each directory in the path, *WX authority to the parent directory, and *W authority to the file. If renaming the volume, *RWX is required to the root (/) directory of the volume.

The object that is identified by a new path cannot exist.

read (Read from File) Yes The file access time is not updated. When reading from files on volumes formatted in Universal Disk Format (UDF), byte locks on the range being read are ignored. The same is true for readv().
readdir (Read Directory Entry) Yes The directory access time is not updated.
readlink (Read Value of Symbolic Link) No QOPT does not have symbolic links.
rename (Rename File or Directory) Partial QOPT does not support renaming a directory. The object must be a file or a volume.

Requires *CHANGE authority to the parent optical volume. For non-UDF volumes, no other authority is required. UDF formatted volumes require *X authority to each directory in the path, *WX authority to the parent directory, and *W authority to the file. If renaming the volume, *RWX is required to the root (/) directory of the volume.

The object that is identified by a new path cannot exist.

rewinddir Yes  
rmdir (Remove Directory) Yes Requires *CHANGE authority to the parent optical volume. For non-UDF volumes, no other authority is required. For UDF formatted volumes, *X authority is required to each directory in the path and *WX authority is required to the parent directory.

Change and modification time stamps for the parent directory are not updated.

The operation will not be allowed if the directory is busy.

stat (Get File Information) Yes File access time stamp is not changed.

Requires *X authority to the parent optical volume. For non-UDF volumes, no other authority is required. For UDF formatted volumes, *X authority is required to each directory in the path preceding the object and *R authority is required to the object. When issued to an optical volume, the size returned is the volume capacity or 2␠147␠483␠647, whichever is smaller.

symlink (Make Symbolic Link) No QOPT does not support symbolic links.
sysconf (Get System Configuration Variables) Yes  
unlink (Remove Link to File) Yes Requires *CHANGE authority to the parent optical volume. For non-UDF volumes, no other authority is required. For UDF formatted volumes, *X authority is required to each directory in the path and *RX authority is required to the parent directory.

Change and modification time stamps for parent directory are not updated.

Link to a file cannot be removed when a job has the file opened.

unmask (Set Authorization Mask for Job) Yes  
utime (Set File Access and Modification Times) No QOPT does not support setting the file access or modification time.
write (Write to File) Yes Change and modification time stamps for the file are updated when the file is closed. When writing to files on volumes formatted in Universal Disk Format (UDF), byte locks on the range being written are ignored. The same is true for writev().