Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

get file name from path dart

void main() {
  var completePath = "/dev/dart/work/hello/app.dart";
  var fileName = (completePath.split('/').last);
  var filePath = completePath.replaceAll("/$fileName", '');
  print(fileName);
  print(filePath);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #file #path #dart
ADD COMMENT
Topic
Name
6+6 =