Here you can find the source of getTempFileGivenName(File file)
Parameter | Description |
---|---|
file | File |
public static String getTempFileGivenName(File file)
//package com.java2s; import java.io.File; public class Main { /**/*from ww w .j av a2 s .co m*/ * Field GIVEN_NAME_SUFFIX<br> * (value is "".mpw."") */ private static final String GIVEN_NAME_SUFFIX = ".mpw."; /** * Method getTempFileGivenName * @param file File * @return String */ public static String getTempFileGivenName(File file) { String fileName = file.getName(); int index = fileName.indexOf(GIVEN_NAME_SUFFIX); if (index < 0) { return fileName; } else { return fileName.substring(0, index); } } }