.\" Copyright (C) 1993 David Metcalfe (david@prism.demon.co.uk) .\" .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" .\" 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) .\" Traducción por Urko Lusa 19980305 .\" Translation revised Mon Aug 17 1998 by Juan Piernas .\" Traducción revisada por Miguel Pérez Ibars el 29-marzo-2005 .\" .TH OPENDIR 3 "11 Junio 1995" "" "Manual del programador de Linux" .SH NOMBRE opendir \- abre un directorio .SH SINOPSIS .nf .B #include .br .B #include .sp .BI "DIR *opendir(const char *" nombre ); .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. .SH "VALOR DEVUELTO" La función \fBopendir()\fP devuelve un puntero al flujo de directorio o NULL si ocurre un error. .SH ERRORES .TP .B EACCES Permiso denegado. .TP .B EMFILE El proceso está usando demasiados descriptores de fichero. .TP .B ENFILE Hay demasiados ficheros abiertos en el sistema. .TP .B ENOENT El directorio no existe o \fInombre\fP es una cadena vacía. .TP .B ENOMEM Memoria insuficiente para completar la operación. .TP .B ENOTDIR \fInombre\fP no es un directorio. .SH OBSERVACIONES El descriptor de fichero asociado al flujo de directorio puede ser obtenido usando .BR dirfd (3). .SH "CONFORME A" SVID 3, POSIX, BSD 4.3 .SH "VÉASE TAMBIÉN" .BR open (2), .BR closedir (3), .BR dirfd (3), .BR readdir (3), .BR rewinddir (3), .BR scandir (3), .BR seekdir (3), .BR telldir (3)