| Skip Navigation Links | |
| Exit Print View | |
![]() | man pages section 2: System Calls Oracle Solaris 11 Information Library |
- get configurable pathname variables
#include <unistd.h>longfpathconf(intfildes,intname);
longpathconf(const char *path,intname);
Thefpathconf() andpathconf() functions determine the current value of a configurablelimit or option ( variable ) that is associated with a fileor directory.
Forpathconf(), thepath argument points to the pathname of a fileor directory.
Forfpathconf(), thefildes argument is an open file descriptor.
Thename argument represents the variable to be queried relative to thatfile or directory. The variables in the following table come from <limits.h>or <unistd.h> and the symbolic constants, defined in <unistd.h>, are the correspondingvalues used forname:
|
Notes:
Ifpath orfildes refers to a directory, the value returned applies to the directory itself.
Ifpath orfildes does not refer to a terminal file, it is unspecified whether an implementation supports an association of the variable name with the specified file.
Ifpath orfildes refers to a directory, the value returned applies to filenames within the directory.
Ifpath orfildes does not refer to a directory, it is unspecified whether an implementation supports an association of the variable name with the specified file.
Ifpath orfildes refers to a directory, the value returned is the maximum length of a relative pathname when the specified directory is the working directory.
Ifpath refers to a FIFO, orfildes refers to a pipe or FIFO, the value returned applies to the referenced object. Ifpath orfildes refers to a directory, the value returned applies to any FIFO that exists or can be created within the directory. Ifpath orfildes refers to any other type of file, it is unspecified whether an implementation supports an association of the variable name with the specified file.
Ifpath orfildes refers to a directory, the value returned applies to any files, other than directories, that exist or can be created within the directory.
Ifpath orfildes refers to a directory, it is unspecified whether an implementation supports an association of the variable name with the specified file.
Ifpath orfildes refers to a directory, the value returned is the maximum length of the string that a symbolic link in that directory can contain.
Ifpath orfildes refers to a file or directory in a file system that supports ACLs, the value returned is the bitwise inclusive OR of the following flags associated with ACL types supported by the file system; otherwise 0 is returned.
The file system supports ACE ACLs.
The file system supports UFS aclent ACLs.
If a filesystem supports the reporting of holes (seelseek(2),pathconf() andfpathconf() 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 filesystem does not specify the minimum hole size but still reports holes.
Ifpath orfildes refers to a directory and the file system in which the directory resides supports access filtering, a non-zero value is returned. Otherwise, 0 is returned.
Ifname is an invalid value, bothpathconf() andfpathconf() return-1anderrno is set to indicate the error.
If the variable corresponding toname has no limit for thepathor file descriptor, bothpathconf() andfpathconf() return-1 without changingerrno.Ifpathconf() needs to usepath to determine the value ofnameandpathconf() does not support the association ofname with the filespecified bypath, or if the process did not have appropriate privileges toquery the file specified bypath, orpath does not exist,pathconf()returns-1 anderrno is set to indicate the error.
Iffpathconf() needs to usefildes to determine the value ofnameandfpathconf() does not support the association ofname with the filespecified byfildes, or iffildes is an invalid file descriptor,fpathconf() returns-1 anderrno is set to indicate the error.
Otherwisepathconf() orfpathconf() returns the current variable value for the fileor directory without changingerrno. The value returned will not be morerestrictive than the corresponding value available to the application when it was compiledwith <limits.h> or <unistd.h>.
Thepathconf() function will fail if:
The value ofname is not valid.
A loop exists in symbolic links encountered during resolution of thepath argument.
Thefpathconf() function will fail if:
The value ofname is not valid.
Thepathconf() function may fail if:
Search permission is denied for a component of the path prefix.
An association of the variablename with the specified file is not supported.
The length of thepath argument exceeds {PATH_MAX} or a pathname component is longer than {NAME_MAX}.
As a result of encountering a symbolic link in resolution of thepath argument, the length of the substituted pathname string exceeded {PATH_MAX}.
A component ofpath does not name an existing file orpath is an empty string.
A component of the path prefix is not a directory.
Thefpathconf() function may fail if:
Thefildes argument is not a valid file descriptor.
An association of the variablename with the specified file is not supported.
The {SYMLINK_MAX} variable applies only to thefpathconf() function.
Seeattributes(5) for descriptions of the following attributes:
|
lseek(2),confstr(3C),limits.h(3HEAD),sysconf(3C),attributes(5),standards(5)
Copyright © 2011, Oracle and/or its affiliates. All rights reserved.Legal Notices | ![]() ![]() |