createDirectoriesFromCreationPath static method

dynamic createDirectoriesFromCreationPath(
  1. String? creationPath,
  2. String folder
)

Create directories from a creationPath.

Implementation

static createDirectoriesFromCreationPath(
    String? creationPath, String folder) async {
  if (creationPath != null) {
    for (var segment in creationPath.split("/").toList()) {
      await MetroService.makeDirectory("$folder/$segment");
      folder += '/$segment';
    }
  }
}