Just to confirm - yup looks like stat
does behave as described by @DraperDanMan and will prefer data dir files over pdx file.
Good to know for sure, but still makes stat
unable to be used to "safely" check if a data file exists on the chance it might be returning you the pdx file.
I've reported another bug that highlights this here, where you can't stat to check before an unlink
.