private static String getFileName ( Resource file ) { String name = file . getName ( ) ; int pos = name . lastIndexOf ( "." ) ; if ( pos == - 1 ) return name ; return name . substring ( 0 , pos ) ; }
get file name of a file object without extension