An 'ls -i' command using Runtime.exec( ) would also provide this information, but it would not be especially effecient (very bad performance actually) with an extreme amount of overhead (at least seen from the Java perspective) for such a small bit of information that you can't really do anything with in Java anyway.
Well, I think it's a bit premature to worry about performace here. This could be an issue if you're calling the mathod many times in a tight loop, but like most "performance issues", in many actual real-life cases it's not an issue at all. Using Runtime.exec() is a relatively easy way to do this, so if Chase really needs inode info in a Java program for some reason, that's a perfectly valid thing to try. If he needs inode info on a lot of files, it may be more efficient to modify the script to handle many files with one process, e.g "ls -iR" to recursively list the subdirectories too (if that was the goal). But it's probably best to wait until there's an observable performance problem here before worrying about how best to fix it.
"I'm not back." - Bill Harding, Twister
You don't like waffles? Well, do you like this tiny ad?