Supported by libMapRClient for hadoop-2.x

Checks the filesystem directly (avoiding a client cache) to determine whether a given file or directory exists.


int hdfsExists2(hdfsFS fs, const char* path)


Parameter Description
fs The filesystem handle. Obtain this handle with one of the hdfsConnect() APIs.
path The directory or file to check the existence of.

Return Value

Returns 0 if the directory or file exists, -1 on error.

Check errno for error codes and meanings.