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

Changes the access and modification times of a file or directory.

Signature

int hdfsUtime(hdfsFS fs, const char* path, tTime mtime, tTime atime)

Parameters

fs

The handle of the filesystem where the file or directory is located. Obtain this handle with one of the hdfsConnect() APIs.

path

The path to the file or directory.

mtime

The new modification time or 0 (if you want to set only the access time) in seconds.

atime

The new access time or 0 (if you want to set only the modification time) in seconds.

Return Value

Returns 0 on success, -1 on error.

errno is set to EINVAL if the input arguments are invalid.

errno is set to EPERM if the process does not have enough privileges to perform the operation.