safeSplitPath static method

List<String> safeSplitPath(
  1. String path
)

Implementation

static List<String> safeSplitPath(String path) {
  return path.replaceAll('\\', '/').split('/')
    ..removeWhere((element) => element.isEmpty);
}