| PATHCONF(2) | System Calls Manual | PATHCONF(2) |
fpathconf,
pathconf — get configurable
pathname variables
#include
<unistd.h>
long
fpathconf(int fildes,
int name);
long
pathconf(const char *path,
int name);
The
pathconf()
and
fpathconf()
functions provides a method for applications to determine the current value
of a configurable system limit or option variable associated with a pathname
or file descriptor.
For pathconf, the
path argument is the name of a file or directory. For
fpathconf, the fildes argument
is an open file descriptor. The name argument
specifies the system variable to be queried. Symbolic constants for each
name value are found in the include file
<unistd.h>.
The available values are as follows:
_PC_LINK_MAX_PC_MAX_CANON_PC_MAX_INPUT_PC_NAME_MAX_PC_PATH_MAX_PC_PIPE_BUF_PC_CHOWN_RESTRICTED_PC_NO_TRUNC_PC_VDISABLE_PC_FILESIZEBITS_PC_XATTR_SIZE_BITS_PC_MIN_HOLE_SIZEpathconf()
and
fpathconf()
return a positive number that represents the minimum hole size returned in
bytes. The offsets of holes returned will be aligned to this same value. A
special value of 1 is returned if the file system does not specify the
minimum hole size but still reports holes.If the call to pathconf or
fpathconf is not successful, -1 is returned and
errno is set appropriately. Otherwise, if the variable
is associated with functionality that does not have a limit in the system,
-1 is returned and errno is not modified. Otherwise,
the current variable value is returned.
If any of the following conditions occur, the
pathconf and fpathconf
functions shall return -1 and set errno to the
corresponding value.
EINVAL]EINVAL]pathconf() will fail if:
EACCES]EIO]ELOOP]ENAMETOOLONG]ENOENT]ENOTDIR]fpathconf() will fail if:
The pathconf and
fpathconf functions first appeared in 4.4BSD.
| June 4, 1993 | BSD 4 |