I wonder if we can get away with getPath() here instead of getAbsolutePath().  If the application was given a relative path into the java.io.File object, its relative to the JVM's current working directory, which cannot be changed.  That can be easily passed down into the native layer, can't it?

The advantage would be that in some applications we might be able to avoid VFS traversal up to the root, and then traversal back down on every file we lstat() in the working directory.  For C Git this actually makes a performance difference on Linux, even though the VFS on Linux is incredibly fast.