question: private static boolean checkFileParentExists ( final String file ) { String fileName = PathUtils . removeSlashFromEnd ( file ) ; File dir = new File ( fileName . substring ( 0 , fileName . lastIndexOf ( "/" ) + 1 ) ) ; return dir . exists ( ) && dir . isDirectory ( ) ; }
target:  check if parent of file in param exists and is directory.