public function delete()
 {
     foreach ($this->getChildren() as $child) {
         $child->delete();
     }
     M::rmdir($this->path);
 }