pathconf

Returns pathname variables.

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

Syntax

  #include <unistd.h> 
   
  long pathconf (
     cons char   *path,
     int          name);
  

Parameters

path

(IN) Points to a pathname of the file or directory.

name

(IN) Specifies a variable to be queried relative to the path parameter. For a list of supported variable, 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

1

ENOENT

A component of path does not name an existing file.

6

EACCES

Search permission is denied for a component of the path prefix.

9

EINVAL

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

65

ENAMETOOLONG

The length of the path argument exceeds the maximum path length, or a pathname component is longer than the maximum name length.

67

ENOTDIR

A component of the path prefix is not a directory.

Remarks

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

See Also