classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: isDirectory/isFile and links


From: Michael Koch
Subject: Re: isDirectory/isFile and links
Date: Thu, 5 Jun 2003 16:14:20 +0200
User-agent: KMail/1.5

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am Donnerstag, 5. Juni 2003 15:40 schrieb Dr. Torsten Rupp:
> Hi,
>
> I yust got a little bit confused, because of the behaviour of
> java.io.File.isDirectory()/java.io.File.isFile(). If the
> requested filename is a link to a file/directory it seems
> always "false" is reported. With JDK "true" is reported. The
> reason for this seems to be the OS function "lstat" which
> is used in java_io_File.c. Should it be "stat" instead?

I looked into the posix version of the native code of java.io.File in 
libgcj. libgcj uses stat instead of lstat. I think stat is the better 
choice.

If unsure you can strace the JDK executing a little test app. 


Michael
- -- 
Homepage: http://www.worldforge.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+31A8WSOgCCdjSDsRAn5cAJ9JeL+GqCAX3moUAXarMFC4+zanAwCaAnAy
3C2I28HZw5Z6xL2tSw6CGgo=
=8rVI
-----END PGP SIGNATURE-----





reply via email to

[Prev in Thread] Current Thread [Next in Thread]