📌  相关文章
📜  从路径 dart 代码示例中获取文件名

📅  最后修改于: 2022-03-11 14:48:06.103000             🧑  作者: Mango

代码示例2
void main() {
  var completePath = "/dev/dart/work/hello/app.dart";
  var fileName = (completePath.split('/').last);
  var filePath = completePath.replaceAll("/$fileName", '');
  print(fileName);
  print(filePath);
}