getFileType static method

String getFileType(
  1. String path
)

获取文件类型

Implementation

static String getFileType(String path) {
  List<String> array = path.split('.');
  return array[array.length - 1];
}