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().

Signature

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

Parameters

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.