.\" -*- coding: UTF-8 -*- .\" Copyright (C) 1995 Andries Brouwer (aeb@cwi.nl) .\" .\" %%%LICENSE_START(VERBATIM) .\" 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. .\" %%%LICENSE_END .\" .\" Written 11 June 1995 by Andries Brouwer .\" Modified 22 July 1995 by Michael Chastain : .\" In 1.3.X, returns only one entry each time; return value is different. .\" Modified 2004-12-01, mtk, fixed headers listed in SYNOPSIS .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH READDIR 2 "6 Marzo 2019" Linux "Manual del Programador de Linux" .SH NOMBRE readdir \- lee una entrada de un directorio .SH SINOPSIS .nf .PP \fBint readdir(unsigned int \fP\fIfd\fP\fB, struct old_linux_dirent *\fP\fIdirp\fP\fB,\fP \fB unsigned int \fP\fIcount\fP\fB);\fP .fi .PP \fINota\fP: No hay envoltorio glibc para esta llamada al sistema; véase NOTAS. .SH DESCRIPCIÓN This is not the function you are interested in. Look at \fBreaddir\fP(3) for the POSIX conforming C library interface. This page documents the bare kernel system call interface, which is superseded by \fBgetdents\fP(2). .PP \fBreaddir\fP() reads one \fIold_linux_dirent\fP structure from the directory referred to by the file descriptor \fIfd\fP into the buffer pointed to by \fIdirp\fP. The argument \fIcount\fP is ignored; at most one \fIold_linux_dirent\fP structure is read. .PP The \fIold_linux_dirent\fP structure is declared (privately in Linux kernel file \fBfs/readdir.c\fP) as follows: .PP .in +4n .EX struct old_linux_dirent { unsigned long d_ino; /* número de nodo\-í */ unsigned long d_offset; /* desplazamiento hasta el \fIold_linux_dirent\fP */ unsigned short d_namlen; /* longitud del \fId_name\fP */ char d_name[1]; /* nombre de fichero (acabado en nulo)*/ } .EE .in .PP \fId_ino\fP is an inode number. \fId_offset\fP is the distance from the start of the directory to this \fIold_linux_dirent\fP. \fId_reclen\fP is the size of \fId_name\fP, not counting the terminating null byte (\(aq\e0\(aq). \fId_name\fP is a null\-terminated filename. .SH "VALOR DEVUELTO" En caso de éxito se devuelve 1. Si se alcanzó el final del directorio se devuelve 0. Si hubo un error se devuelve \-1 y la variable \fIerrno\fP se modifica apropiadamente. .SH ERRORES .TP \fBEBADF\fP Descriptor de fichero \fIfd\fP inválido. .TP \fBEFAULT\fP El argumento señala fuera del espacio de direcciones del proceso que realiza la llamada. .TP \fBEINVAL\fP El buffer para el resultado es demasiado pequeño. .TP \fBENOENT\fP No existe el directorio. .TP \fBENOTDIR\fP El descriptor de fichero no se refiere a un directorio. .SH "CONFORME A" Esta llamada al sistema es específica de Linux. .SH NOTAS Glibc does not provide a wrapper for this system call; call it using \fBsyscall\fP(2). You will need to define the \fIold_linux_dirent\fP structure yourself. However, probably you should use \fBreaddir\fP(3) instead. .PP This system call does not exist on x86\-64. .SH "VÉASE TAMBIÉN" \fBgetdents\fP(2), \fBreaddir\fP(3) .SH COLOFÓN Esta página es parte de la versión 5.10 del proyecto Linux \fIman\-pages\fP. Puede encontrar una descripción del proyecto, información sobre cómo informar errores y la última versión de esta página en \%https://www.kernel.org/doc/man\-pages/. .PP .SH TRADUCCIÓN La traducción al español de esta página del manual fue creada por Vicente Pastor Gómez . .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 .