Simple way of retrieving the file path from a File object?

Quick question: is there a simple way to retrieve the absolute directory path from a File object? getFullPathName() includes the file name; is there a method that does not include the file name and just returns the path of the directory the file is in? I can of course eat away the file name from the full path - just wondering whether there is a canned method for this.

yourFile.getParentDirectory().getFullPathName()?

Ha! I shoulda thought of that - should do the trick - tx!