.\" -*- coding: UTF-8 -*- '\" t .\" Copyright (C) 1993 David Metcalfe (david@prism.demon.co.uk) .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" References consulted: .\" Linux libc source code .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" Modified Sat Jul 24 18:46:01 1993 by Rik Faith (faith@cs.unc.edu) .\" Modified 11 June 1995 by Andries Brouwer (aeb@cwi.nl) .\" 2007-07-30 Ulrich Drepper : document fdopendir(). .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH opendir 3 "20 ​​Julio 2023" "Páginas de manual de Linux 6.05.01" .SH NOMBRE opendir, fdopendir \- abre un directorio .SH BIBLIOTECA Biblioteca Estándar C (\fIlibc\fP, \fI\-lc\fP) .SH SINOPSIS .nf \fB#include \fP \fB#include \fP .PP \fBDIR *opendir(const char *\fP\fInombre\fP\fB);\fP \fBDIR *fdopendir(int \fP\fIfd\fP\fB);\fP .fi .PP .RS -4 Requisitos de Macros de Prueba de Características para glibc (véase \fBfeature_test_macros\fP(7)): .RE .PP \fBfdopendir\fP(): .nf Desde glibc 2.10: _POSIX_C_SOURCE >= 200809L Antes de glibc 2.10: _GNU_SOURCE .fi .SH DESCRIPCIÓN La función \fBopendir\fP() abre un flujo de directorio correspondiente al directorio \fInombre\fP, y devuelve un puntero al flujo de directorio. El flujo se sitúa en la primera entrada del directorio. .PP The \fBfdopendir\fP() function is like \fBopendir\fP(), but returns a directory stream for the directory referred to by the open file descriptor \fIfd\fP. After a successful call to \fBfdopendir\fP(), \fIfd\fP is used internally by the implementation, and should not otherwise be used by the application. .SH "VALOR DEVUELTO" The \fBopendir\fP() and \fBfdopendir\fP() functions return a pointer to the directory stream. On error, NULL is returned, and \fIerrno\fP is set to indicate the error. .SH ERRORES .TP \fBEACCES\fP Permiso denegado. .TP \fBEBADF\fP \fIfd\fP is not a valid file descriptor opened for reading. .TP \fBEMFILE\fP Se ha alcanzado el límite de descriptores de archivo abiertos para cada proceso. .TP \fBENFILE\fP Se ha alcanzado el límite máximo de archivos abiertos para el conjunto del sistema. .TP \fBENOENT\fP El directorio no existe o \fInombre\fP es una cadena vacía. .TP \fBENOMEM\fP Memoria insuficiente para completar la operación. .TP \fBENOTDIR\fP \fInombre\fP no es un directorio. .SH ATRIBUTOS Para obtener una explicación de los términos usados en esta sección, véase \fBattributes\fP(7). .TS allbox; lbx lb lb l l l. Interfaz Atributo Valor T{ .na .nh \fBopendir\fP(), \fBfdopendir\fP() T} Seguridad del hilo Multi\-hilo seguro .TE .sp 1 .SH ESTÁNDARES POSIX.1\-2008. .SH ESTÁNDARES .TP \fBopendir\fP() SVr4, 4.3BSD, POSIX.1\-2001. .TP \fBfdopendir\fP() POSIX.1\-2008. glibc 2.4. .SH NOTAS Filename entries can be read from a directory stream using \fBreaddir\fP(3). .PP El descriptor de fichero asociado al flujo de directorio puede ser obtenido usando \fBdirfd\fP(3). .PP The \fBopendir\fP() function sets the close\-on\-exec flag for the file descriptor underlying the \fIDIR *\fP. The \fBfdopendir\fP() function leaves the setting of the close\-on\-exec flag unchanged for the file descriptor, \fIfd\fP. POSIX.1\-200x leaves it unspecified whether a successful call to \fBfdopendir\fP() will set the close\-on\-exec flag for the file descriptor, \fIfd\fP. .SH "VÉASE TAMBIÉN" \fBopen\fP(2), \fBclosedir\fP(3), \fBdirfd\fP(3), \fBreaddir\fP(3), \fBrewinddir\fP(3), \fBscandir\fP(3), \fBseekdir\fP(3), \fBtelldir\fP(3) .PP .SH TRADUCCIÓN La traducción al español de esta página del manual fue creada por Urko Lusa , Juan Piernas y Miguel Pérez Ibars . .PP Esta traducción es documentación libre; lea la .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3 .UE o posterior con respecto a las condiciones de copyright. No existe NINGUNA RESPONSABILIDAD. .PP Si encuentra algún error en la traducción de esta página del manual, envíe un correo electrónico a .MT debian-l10n-spanish@lists.debian.org .ME .