getFileName static method

String getFileName(
  1. String path
)

converts /some/path/file.json to file.json

Implementation

static String getFileName(String path) {
  return path.replaceAll(Platform.pathSeparator, '/').split('/').last;
}