code: public static String fileNameOf(String path) {
          return path.substring(Math.max(path.lastIndexOf('/'), path.lastIndexOf('\\')) + 1);
      }
docs: Shortcut implementation that determines the substring after the last Windows or *nix
  path separator.
  
  @param path The path to return filename of.
  @return The part of the specified part after the last slash or backslash.