private static boolean exists ( File link ) { File [ ] kids = link . getParentFile ( ) . listFiles ( ) ; return kids != null && Arrays . asList ( kids ) . contains ( link ) ; }
File . exists returns false for a link with a missing target so for Java 6 compatibility we have to use this circuitous method to see if it was created .