Cross-Platform which method do not return a directory as valid result