hdfsCreateDirectory()

Supported by libMapRClient for hadoop-2.x

Creates a file or directory at the specified path. Intermediate directories in the path that do not exist are created.

Signature

int hdfsCreateDirectory(hdfsFS fs, const char* path)

Parameters

Parameter Description
fs The handle of the file system in which to create the file or directory. Obtain this handle with one of the hdfsConnect() APIs.
path The path of the directory.

Return Value

Returns 0 on success, -1 on error.

Check errno for error codes and meanings.

errno is set to EINVAL if the input arguments are not valid, EEXIST if the directory already exists, or EACCES if the parent directory does not allow the user write permission.