public static String getFilename(final String pathname) {
    String filename = pathname;

    if (StringUtils.isNotBlank(filename)) {
      final int index = filename.lastIndexOf(File.separator);
      filename = (index == -1 ? filename : filename.substring(index + 1));
    }

    return filename;
  }
Extracts the filename from the pathname of a file system resource (file).
<p>

@param pathname a String indicating the path, or location of the file system resource.
@return a String value containing only the filename of the file system resource (file).
geode-core/src/main/java/org/apache/geode/internal/util/IOUtils.java