Abort File delete operation

Before delete file I need to check its path. If the condition is true than I want that file delete operation aborted. I am trying it from preDelete hook. But it is not working.

\OC::$server->getRootFolder()->listen(’\OC\Files’, ‘preDelete’, function(\OCP\Files\Node $node) {
/**** Also $node is blank ***/
})