Here you can find the source of getFilename(final File file)
Parameter | Description |
---|---|
file | a parameter |
public static String getFilename(final File file)
//package com.java2s; /******************************************************************************* * Manchester Centre for Integrative Systems Biology * University of Manchester//ww w. ja v a 2 s . c o m * Manchester M1 7ND * United Kingdom * * Copyright (C) 2007 University of Manchester * * This program is released under the Academic Free License ("AFL") v3.0. * (http://www.opensource.org/licenses/academic.php) *******************************************************************************/ import java.io.*; public class Main { /** * */ public final static String EXTENSION_SEPARATOR = "."; /** * * @param file * @return String */ public static String getFilename(final File file) { return file.getName().substring(0, file.getName().lastIndexOf(EXTENSION_SEPARATOR)); } }