question: public static String filenameWithoutExtension ( IFile file ) { String filename = file . getName ( ) ; int extPos = filename . lastIndexOf ( '.' ) ; if ( extPos == - 1 ) { return filename ; } return filename . substring ( 0 , extPos ) ; }
target:  Returns the filename without its file extension (if present). Note that this only removes the last extension, in the case of multiple extensions. Note that if the file has a leading dot (e.g. hidden files), this method will return an empty string.