Supported by libMapRClient for hadoop-0.20.2 and hadoop-2.x

Gets the current working directory for the filesystem. Before calling this method, the application must have called hdfsSetWorkingDirectory().


char* hdfsGetWorkingDirectory(hdfsFS fs, char *buffer, size_t bufferSize)


Parameter Description
fs The filesystem handle.
buffer The buffer in which to copy path of current working directory.
bufferSize The length of user-buffer.

Return Value

Returns the buffer on success, NULL on error.

errno is set to EINVAL for invalid arguments.