Here you can find the source of getFileName(String completePath)
Parameter | Description |
---|---|
completePath | Description of the Parameter |
public static String getFileName(String completePath)
//package com.java2s; /*//from ww w .j a v a2 s.c o m * Copyright (c) Fiorano Software Pte. Ltd. and affiliates. All rights reserved. http://www.fiorano.com * The software in this package is published under the terms of the CPAL v1.0 * license, a copy of which has been included with this distribution in the * LICENSE.txt file. */ import java.io.*; public class Main { /** * Gets the fileName from the complete path * * @param completePath Description of the Parameter * @return The fileName value */ public static String getFileName(String completePath) { if (completePath == null) return null; return completePath.substring(completePath.lastIndexOf(File.separator) + 1, completePath.length()); } }