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.


int hdfsCreateDirectory(hdfsFS fs, const char* path)


Parameter Description
fs The handle of the filesystem 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.