($dir != '/' || $file !== 'Shared')

(who doesn't love JS)