hdfsUtime()

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

Supported by libMapRClient for hadoop-2.x

Signature

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

Parameters

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

For more information, see the atimeUpdateTimeInterval entry in volume create.

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.