delete method

  1. @override
void delete(
  1. String path,
  2. {bool recursive = false,
  3. EntityType type = EntityType.file}
)
override

Deletes this Entity

Implementation

@override
void delete(
  String path, {
  bool recursive = false,
  EntityType type = EntityType.file,
}) {
  if (open(dirname(path)) case VDir dir) {
    dir.children.remove(basename(path)) != null ? true : false;
  } else {
    throw "[Virtual FileSystem]: dir not exists!";
  }
}