fpathconf(3) Library Functions Manual fpathconf(3) NOMBRE fpathconf, pathconf - obtiene valores de configuracion para ficheros BIBLIOTECA Biblioteca Estandar C (libc, -lc) SINOPSIS #include long fpathconf(int descf, int nombre); long pathconf(const char *ruta, int nombre); DESCRIPCION fpathconf() obtiene un valor para la opcion de configuracion nombre para el descriptor de fichero abierto descf. pathconf() obtiene un valor para la opcion de configuracion nombre para el nombre de fichero ruta. Las correspondientes macros definidas en son valores minimos; si una aplicacion quiere enterarse con seguridad de valores que pueden cambiar, puede hacer una llamada a fpathconf() o a pathconf() obteniendo asi resultados mas liberales. Hacer nombre igual a una de las siguientes constantes devuelve las siguientes opciones de configuracion: _PC_LINK_MAX El numero maximo de enlaces al fichero. Si descf o ruta se refieren a un directorio, entonces el valor se aplica al directorio entero. La macro correspondiente es _POSIX_LINK_MAX. _PC_MAX_CANON La longitud maxima de una linea de entrada formateada, donde descf o ruta deben referirse a una terminal. La macro correspondiente es _POSIX_MAX_CANON. _PC_MAX_INPUT La longitud maxima de una linea de entrada, donde descf o ruta deben referirse a una terminal. La macro correspondiente es _POSIX_MAX_INPUT. _PC_NAME_MAX La maxima longitud de un nombre de fichero en el directorio ruta o descf que el proceso es capaz de crear. La macro correspondiente es _POSIX_NAME_MAX. _PC_PATH_MAX La maxima longitud de un nombre de ruta relativo donde ruta o descf es el directorio de trabajo. La macro correspondiente es _POSIX_PATH_MAX. _PC_PIPE_BUF The maximum number of bytes that can be written atomically to a pipe of FIFO. For fpathconf(), fd should refer to a pipe or FIFO. For fpathconf(), path should refer to a FIFO or a directory; in the latter case, the returned value corresponds to FIFOs created in that directory. The corresponding macro is _POSIX_PIPE_BUF. _PC_CHOWN_RESTRICTED This returns a positive value if the use of chown(2) and fchown(2) for changing a file's user ID is restricted to a process with appropriate privileges, and changing a file's group ID to a value other than the process's effective group ID or one of its supplementary group IDs is restricted to a process with appropriate privileges. According to POSIX.1, this variable shall always be defined with a value other than -1. The corresponding macro is _POSIX_CHOWN_RESTRICTED. Si fd o ruta se refieren a un directorio, el valor de salida se aplicara a todos los archivo en ese directorio. _PC_NO_TRUNC Devuelve no-cero si acceder a nombres de ficheros de longitud mayor que _POSIX_NAME_MAX genera un error. La macro correspondiente es _POSIX_NO_TRUNC. _PC_VDISABLE Devuelve no-cero si se puede inhabilitar el procesamiento de caracteres especiales, donde descf o ruta deben referirse a una terminal. VALOR DEVUELTO El valor de salida de estas funciones es uno de los siguientes: o On error, -1 is returned and errno is set to indicate the error (for example, EINVAL, indicating that name is invalid). o If name corresponds to a maximum or minimum limit, and that limit is indeterminate, -1 is returned and errno is not changed. (To distinguish an indeterminate limit from an error, set errno to zero before the call, and then check whether errno is nonzero when -1 is returned.) o If name corresponds to an option, a positive value is returned if the option is supported, and -1 is returned if the option is not supported. o Otherwise, the current value of the option or limit is returned. This value will not be more restrictive than the corresponding value that was described to the application in or when the application was compiled. ERRORES EACCES (pathconf()) Search permission is denied for one of the directories in the path prefix of path. EBADF (fpathconf()) fd is not a valid file descriptor. EINVAL name no es valido. EINVAL The implementation does not support an association of name with the specified file. ELOOP (pathconf()) Too many symbolic links were encountered while resolving path. ENAMETOOLONG (pathconf()) path is too long. ENOENT (pathconf()) A component of path does not exist, or path is an empty string. ENOTDIR (pathconf()) A component used as a directory in path is not in fact a directory. ATRIBUTOS Para obtener una explicacion de los terminos usados en esta seccion, vease attributes(7). +-----------------------------+--------------------+-------------------+ |Interfaz | Atributo | Valor | +-----------------------------+--------------------+-------------------+ |fpathconf(), pathconf() | Seguridad del hilo | Multi-hilo seguro | +-----------------------------+--------------------+-------------------+ ESTANDARES POSIX.1-2008. HISTORIAL POSIX.1-2001. NOTAS Pueden existir en el directorio dado ficheros cuyos nombres sean de longitud mayor que el valor devuelto para nombre igual a _PC_NAME_MAX. Algunos valores devueltos pueden ser enormes. No son apropiados para reservar memoria. VEASE TAMBIEN getconf(1), open(2), statfs(2), confstr(3), sysconf(3) TRADUCCION La traduccion al espanol de esta pagina del manual fue creada por Gerardo Aburruzaga Garcia y Marcos Fouces Esta traduccion es documentacion libre; lea la GNU General Public License Version 3 o posterior con respecto a las condiciones de copyright. No existe NINGUNA RESPONSABILIDAD. Si encuentra algun error en la traduccion de esta pagina del manual, envie un correo electronico a . Paginas de Manual de Linux 6.9.1 2 Mayo 2024 fpathconf(3)