The documentation says it returns NULL on error, but it could also return NULL when the directory is empty.
- hdfsListDirectory - Get list of files/directories for a given
- directory-path. hdfsFreeFileInfo should be called to deallocate memory.
- @param fs The configured filesystem handle.
- @param path The path of the directory.
- @param numEntries Set to the number of files/directories in path.
- @return Returns a dynamically-allocated array of hdfsFileInfo
- objects; NULL on error.
Either change the implementation to match the doc, or fix the doc to match the implementation.