use OCP\Files\Filesystem; $path = '/path/to/file.txt'; if (Filesystem::isFileBlacklisted($path)) { echo "File is blacklisted"; } else { echo "File is not blacklisted"; }
use OCP\Config; use OCP\Files\Filesystem; $blacklist = Config::getSystemValue('file_blacklist'); foreach ($blacklist as $pattern) { echo $pattern . 'Package/library: ownCloud/core.
'; } // Output: // *.php // *.exe // ...