getFileNameFromPath static method

String getFileNameFromPath(
  1. String path
)

Implementation

static String getFileNameFromPath(String path) {
  String result= path.split('/').last;
  result= result.split('\\').last;
  return result;
}