Android Path Sub Path Get getLastPathComponent(final String filePath)

Here you can find the source of getLastPathComponent(final String filePath)

Description

get Last Path Component

Declaration

private static String getLastPathComponent(final String filePath) 

Method Source Code

//package com.java2s;

public class Main {
    private static String getLastPathComponent(final String filePath) {
        final String[] segments = filePath.split("/");
        final String lastPathComponent = segments[segments.length - 1];
        return lastPathComponent;
    }/*from  w  w  w  . jav  a2s  .co  m*/
}

Related

  1. getSubFiles(String parentpath, String uri, FileFilter fileFilter)
  2. hasSubFiles(String path)
  3. hasSubFiles(String path, String uri)
  4. getLastPathComponent(File file)
  5. getLastPathComponent(String filePath)
  6. getLastPathComponent(String url)