Supported by libMapRClient for hadoop-2.x

Checks whether a given directory or file exists on the filesystem.


int hdfsExists(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.