JsLib jsLib = bundlableNode.app().jsLib(contentPath.properties.get("lib"));
resourceFile = jsLib.file(resourcePath);
}
else
{
throw new ContentProcessingException("Cannot handle request with form name " + contentPath.formName);
}
try
{
if (fileIgnoredByBrjsConfig(resourceFile)) {
String relativePath = RelativePathUtility.get(brjs.getFileInfoAccessor(), brjs.dir(), resourceFile);
throw new FileNotFoundException("The file at '"+relativePath+"' is ignored by the BRJS configuration so cannot be served");
}
return new BinaryResponseContent( new FileInputStream(resourceFile) );
}
catch (FileNotFoundException | ConfigException ex)
{
throw new ContentProcessingException(ex);
}
}