getFileName static method

String getFileName(
  1. String path
)

Retrieves the file name from the given path.

Implementation

static String getFileName(String path) {
  return path.split('/').last;
}