mkdir method

Future<VFolder> mkdir(
  1. String path, {
  2. bool recursive = true,
  3. bool $recursing = false,
})

Implementation

Future<VFolder> mkdir(String path,
    {bool recursive = true, bool $recursing = false}) async {
  path = VPaths.sanitize(path);
  if (!await exists(path)) {
    if (VPaths.hasParent(path)) {
      await mkdir(VPaths.parentOf(path),
          recursive: recursive, $recursing: true);
    }

    VFolder v = await onMakeDirectory(path);
    success("MKDIR $path");

    return v;
  }

  return (await getEntity(path)) as VFolder;
}