1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
|
.\" Copyright (C), 1994, Graeme W. Wilford. (Wilf.)
.\"
.\" 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.
.\"
.\" Thu Jul 29 00:51:03 BST 1994 Wilf. (G.Wilford@ee.surrey.ac.uk)
.\"
.\" Translated into Spanish Thu Mar 5 18:33:18 CET 1998 by Gerardo
.\" Aburruzaga Garca <gerardo.aburruzaga@uca.es>
.\"
.TH REALPATH 3 "5 Marzo 1998" "GNU" "Manual del Progamador de Linux"
.SH NOMBRE
realpath \- devuelve el nombre de camino absoluto en forma cannica
.SH SINOPSIS
.nf
.B #include <sys/param.h>
.B #include <unistd.h>
.sp
.BI "char *realpath(char *" camino ", char " camino_resuelto[] );
.SH DESCRIPCIN
.B realpath
expande todos los enlaces simblicos y resuelve referencias a
.IR '/./' ", " '/../'
y los caracteres extra
.I '/'
en la cadena de caracteres terminada en cero especificada por
.I camino
y guarda el camino absoluto en forma cannica en el bfer de tamao
.B MAXPATHLEN
al que apunte
.IR camino_resuelto .
El camino resultante no tendr enlaces simblicos ni componentes
.I '/./'
o
.IR '/../' .
.SH "VALOR DEVUELTO"
Si no hay error, devuelve un puntero a
.IR camino_resuelto .
Si lo hay, devuelve un puntero NULL y pone en
.I camino_resuelto
el camino absoluto del componente de
.I camino
que no pudo resolverse. La variable global
.I errno
toma un valor que indica el error.
.SH ERRORES
.TP 0.8i
.B ENOTDIR
Un componente del prefijo del camino no es un directorio.
.TP
.B EINVAL
El camino contiene un carcter con el bit ms alto a 1.
.TP
.B ENAMETOOLONG
Un componente de un camino se pasa de
.B MAXNAMLEN
caracteres,
o el nombre de camino entero sobrepasa
.B MAXPATHLEN
caracteres.
.TP
.B ENOENT
El fichero especificado no existe.
.TP
.B EACCES
No hay permiso de paso para un componente prefijo del camino.
.TP
.B ELOOP
Se han encontrado demasiados enlaces simblicos al traducir el camino.
.TP
.B EIO
Ha ocurrido un error de E/S mientras se lee del sistema de ficheros.
.SH "VASE TAMBIN"
.BR readlink "(2), " getcwd (3)
|