On Ubuntu, if path is a directory, I do receive an error.
If it is a file it returns 0.
If it point to nothing (i.e. the file doesn't exists) it returns 0.
This is weird and thus I have no clue if the file is read correctly.
AFAIK, this might be due to libxml xmlNewTextReaderFilename method that doesn't return an error code when the file doesn't exist. So this is a bug of libxml2. But I think we can find a workaround.
On Ubuntu, if path is a directory, I do receive an error. If it is a file it returns 0. If it point to nothing (i.e. the file doesn't exists) it returns 0. This is weird and thus I have no clue if the file is read correctly.
I didn't test on other platform. The code involved for this test is on JamomaPureData repo but something similar appear in JamomaMax code. see : https://github.com/jamoma/JamomaPureData/blob/master/library/source/JamomaForPd.cpp#L130
AFAIK, this might be due to libxml xmlNewTextReaderFilename method that doesn't return an error code when the file doesn't exist. So this is a bug of libxml2. But I think we can find a workaround.