I am trying to read the mask.json from a site_package and use that to generate an api response using an extension like nnrestapi
this is the code i currently have
$filePath = "EXT:site_package/Configuration/Mask/mask.json";
$resourceFactory = GeneralUtility::makeInstance(ResourceFactory::class);
$file = $resourceFactory->retrieveFileOrFolderObject($filePath);
$fileContent = $file->getContents();
// do something with $fileContent
but I am getting this error
Tried to access a private resource file "EXT:site_package/Configuration/Mask/mask.json" from fallback compatibility storage. This storage only handles public files.
How can I access that file? Is there a better way? Maybe to edit the site_package directly?