opendir(3) Library Functions Manual opendir(3) NOMBRE opendir, fdopendir - abre un directorio BIBLIOTECA Biblioteca Estandar C (libc, -lc) SINOPSIS #include #include DIR *opendir(const char *nombre); DIR *fdopendir(int fd); Requisitos de Macros de Prueba de Caracteristicas para glibc (vease feature_test_macros(7)): fdopendir(): Desde glibc 2.10: _POSIX_C_SOURCE >= 200809L Antes de glibc 2.10: _GNU_SOURCE DESCRIPCION La funcion opendir() abre un flujo de directorio correspondiente al directorio nombre, y devuelve un puntero al flujo de directorio. El flujo se situa en la primera entrada del directorio. The fdopendir() function is like opendir(), but returns a directory stream for the directory referred to by the open file descriptor fd. After a successful call to fdopendir(), fd is used internally by the implementation, and should not otherwise be used by the application. VALOR DEVUELTO The opendir() and fdopendir() functions return a pointer to the directory stream. On error, NULL is returned, and errno is set to indicate the error. ERRORES EACCES Permiso denegado. EBADF fd is not a valid file descriptor opened for reading. EMFILE Se ha alcanzado el limite de descriptores de archivo abiertos para cada proceso. ENFILE Se ha alcanzado el limite maximo de archivos abiertos para el conjunto del sistema. ENOENT El directorio no existe o nombre es una cadena vacia. ENOMEM Memoria insuficiente para completar la operacion. ENOTDIR nombre no es un directorio. ATRIBUTOS Para obtener una explicacion de los terminos usados en esta seccion, vease attributes(7). +-----------------------------+--------------------+-------------------+ |Interfaz | Atributo | Valor | +-----------------------------+--------------------+-------------------+ |opendir(), fdopendir() | Seguridad del hilo | Multi-hilo seguro | +-----------------------------+--------------------+-------------------+ ESTANDARES POSIX.1-2008. ESTANDARES opendir() SVr4, 4.3BSD, POSIX.1-2001. fdopendir() POSIX.1-2008. glibc 2.4. NOTAS Filename entries can be read from a directory stream using readdir(3). El descriptor de fichero asociado al flujo de directorio puede ser obtenido usando dirfd(3). The opendir() function sets the close-on-exec flag for the file descriptor underlying the DIR *. The fdopendir() function leaves the setting of the close-on-exec flag unchanged for the file descriptor, fd. POSIX.1-200x leaves it unspecified whether a successful call to fdopendir() will set the close-on-exec flag for the file descriptor, fd. VEASE TAMBIEN open(2), closedir(3), dirfd(3), readdir(3), rewinddir(3), scandir(3), seekdir(3), telldir(3) TRADUCCION La traduccion al espanol de esta pagina del manual fue creada por Urko Lusa , Juan Piernas y Miguel Perez Ibars 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.06 31 Octubre 2023 opendir(3)