fpathconf

Returns configurable pathname variables.

Library:LibC
Classification:POSIX
Service:File and Directory I/O

Syntax

  #include <unistd.h> 
   
  long fpathconf (
     int   fildes,
     int   name);
  

Parameters

fildes

(IN) Specifies an open file descriptor.

name

(IN) Specifies a pathname variable to be queried in the file specified by the fildes parameter. For a list of supported variables, see Path Configuration Variables

Return Values

If successful, returns the value of the variable specified by the name parameter. Otherwise, returns -1 and sets errno to one of the following:

Decimal

Constant

Description

4

EBADF

Invalid file descriptor.

6

EACCES

Search permission is denied.

9

EINVAL

The value of name is not valid, or not valid for the specified file.

Remarks

The fpathconf function can return -1 without setting a value in errno if the value of any of the name flags is unspecified.

See Also