Next: Utility Limits, Previous: File Minimums, Up: System Configuration
pathconfWhen your machine allows different files to have different values for a file system parameter, you can use the functions in this section to find out the value that applies to any particular file.
These functions and the associated constants for the parameter argument are declared in the header file unistd.h.
This function is used to inquire about the limits that apply to the file named filename.
The parameter argument should be one of the `_PC_' constants listed below.
The normal return value from
pathconfis the value you requested. A value of-1is returned both if the implementation does not impose a limit, and in case of an error. In the former case,errnois not set, while in the latter case,errnois set to indicate the cause of the problem. So the only way to use this function robustly is to store0intoerrnojust before calling it.Besides the usual file name errors (see File Name Errors), the following error condition is defined for this function:
EINVAL- The value of parameter is invalid, or the implementation doesn't support the parameter for the specific file.
This is just like
pathconfexcept that an open file descriptor is used to specify the file for which information is requested, instead of a file name.The following
errnoerror conditions are defined for this function:
EBADF- The filedes argument is not a valid file descriptor.
EINVAL- The value of parameter is invalid, or the implementation doesn't support the parameter for the specific file.
Here are the symbolic constants that you can use as the parameter
argument to pathconf and fpathconf. The values are all
integer constants.
_PC_LINK_MAXLINK_MAX.
_PC_MAX_CANONMAX_CANON.
_PC_MAX_INPUTMAX_INPUT.
_PC_NAME_MAXNAME_MAX.
_PC_PATH_MAXPATH_MAX.
_PC_PIPE_BUFPIPE_BUF.
_PC_CHOWN_RESTRICTED_POSIX_CHOWN_RESTRICTED.
_PC_NO_TRUNC_POSIX_NO_TRUNC.
_PC_VDISABLE_POSIX_VDISABLE.
_PC_SYNC_IO_POSIX_SYNC_IO.
_PC_ASYNC_IO_POSIX_ASYNC_IO.
_PC_PRIO_IO_POSIX_PRIO_IO.
_PC_SOCK_MAXBUF_POSIX_PIPE_BUF.
_PC_FILESIZEBITS_PC_REC_INCR_XFER_SIZEPOSIX_REC_INCR_XFER_SIZE.
_PC_REC_MAX_XFER_SIZEPOSIX_REC_MAX_XFER_SIZE.
_PC_REC_MIN_XFER_SIZEPOSIX_REC_MIN_XFER_SIZE.
_PC_REC_XFER_ALIGNPOSIX_REC_XFER_ALIGN.