protected function removeDeletedFsChildrenFromDb($dbChildren)
    {
        $existingChildren = [];

        // First delete all children that do not exist in fs
        foreach ($dbChildren as $child) {

            if (!$this->filesystem->exists($child->getPath())) {
                $this->nodeRepository->delete($child);
                continue;
            }
            $existingChildren[] = $child;
        }

        return $existingChildren;
    }
protected function removeDeletedFsChildrenFromDb($dbChildren)
    {
        $existingChildren = [];

        // First delete all children that do not exist in fs
        foreach ($dbChildren as $child) {

            if (!$this->filesystem->exists($child->getPath())) {
                $this->nodeRepository->delete($child);
                continue;
            }
            $existingChildren[] = $child;
        }

        return $existingChildren;
    }
protected function removeDeletedFsChildrenFromDb ( $ dbChildren ) { $ existingChildren = [ ] ; // First delete all children that do not exist in fs foreach ( $ dbChildren as $ child ) { if ( ! $ this -> filesystem -> exists ( $ child -> getPath ( ) ) ) { $ this -> nodeRepository -> delete ( $ child ) ; continue ; } $ existingChildren [ ] = $ child ; } return $ existingChildren ; }
Delete the non existing

@param CanHaveParent[] $dbChildren

@return array
Delete the non existing