Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- libc - <b>pathconf</b> http://www.ousob.com [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
pathconf
========

Syntax
------

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

Description
-----------

This function returns various system-dependent configuration values.
The NAME is one of the following:

`_PC_LINK_MAX'
     The maximum number of directory entries that can refer to a single
     real file.

`_PC_MAX_CANON'
     The maximum number of bytes in an editable input line.

`_PC_MAX_INPUT'
     The maximum number of bytes in a non-editable input line.

`_PC_NAME_MAX'
     The maximum length of an individual file name.

`_PC_PATH_MAX'
     The maximum length of a complete path name.

`_PC_PIPE_BUF'
     The size of a pipe's internal buffer.

`_PC_CHOWN_RESTRICTED'
     If non-zero, only privileged user can chown() files, otherwise
     anyone may give away files.

`_PC_NO_TRUNC'
     If false filenames longer than `_PC_NAME_MAX' are truncated,
     otherwise an error occurs if you use longer names.

`_PC_VDISABLE'
     A character to use to disable tty special characters.

Return Value
------------

The selected configuration value is returned.

Example
-------

     char *buf = malloc(pathconf("c:/", _PC_MAX_PATH)+1);


Online resources provided by: http://www.ousob.com --- NG 2 HTML conversion by Dave Pearson