Re: how to detect a hard link in Java?
- From: Wibble <Wibble@xxxxxxxxxxxxxx>
- Date: Tue, 30 Aug 2005 23:05:16 -0400
jojo wrote:
You can either Runtime.exec("/bin/ls -il "+filename) and parse the result, or grab a package likeI have an application need to detect the hard links within the unix file systems. how to detect it and how to get the target path of this link points to in Java? thanks a lot
http://www.bmsi.com/java/posix/package.html
which includes Posix.stat() to get the inode and the number of links for a file or directory.
Files with more than one link are hard links. What it points to is an inode. You pretty much have to search the file system for another hard link with the same inode number. .
- References:
- how to detect a hard link in Java?
- From: jojo
- how to detect a hard link in Java?
- Prev by Date: Re: Yet Another Web Application Mess...
- Next by Date: Re: Getting Two Java Applets to Communicate with Each Other
- Previous by thread: Re: how to detect a hard link in Java?
- Next by thread: Re: how to detect a hard link in Java?
- Index(es):
Relevant Pages
|