Index of Section 2 Manual Pages

Interix / SUAwcs_utime.2Interix / SUA

wcs_utime(2)                                               wcs_utime(2)

  utime()

  NAME

    utime(), wcs_utime() - set file times

  SYNOPSIS

    #include 
    #include 

    int utime (const char *file, const struct utimbuf *timep)
    int wcs_utime (const wchar_t *file, const struct utimbuf *timep)

  DESCRIPTION

    The utime(2) and wcs_utime(2) functions are identical, except that
    wcs_utime(2) accepts wide characters in the file argument.

    The utime(2) or wcs_utime(2) function sets the access and modification
    times of the named file from the members of the timep argument.

    If the times are specified (the timep argument is non-NULL) the caller
    must be the owner of the file.

    If the times are not specified (the timep argument is NULL) the caller
    must be the owner of the file and have permission to write the file. In
    this case, the file times are set to the current time (now).

    The timebuf structure timep is defined in  and contains the
    following members:
    time_t     actime      Access time

    time_t     modtime     Modification time

  RETURN VALUE

    Upon successful completion, 0 is returned. Otherwise, -1 is returned,
    errno is set to indicate the error, and the file times are not affected.

  ERRORS

    The utime(2) or wcs_utime(2) function may fail and set errno for any of
    these errors:

    [EACCES]
        The effective user ID of the process doesn't own the file and write
        access is denied, or search permission is denied on some directory in
        the file pathname.

    [EINVAL]
        The file is on a device that does not allow the operation.

    [ENAMETOOLONG]
        The file was longer than {PATHMAX} characters, or a component of file
        exceeded {NAMEMAX} characters.

    [ENOENT]
        The file doesn't exist or is an empty string.

    [ENOTDIR]
        Some component of the pathname prefix of file is not a directory.

    [EPERM]
        The times argument is non-NULL, and the effective user ID of the
        process is not the owner of the file, nor does it have the appropriate
        privileges.

    [EROFS]
        The file is on a read-only file system.

  SEE ALSO

    stat(2)

  USAGE NOTES

    All of these functions are thread safe.

    All of these functions are async-signal safe.


Interix / SUAHosted at SUA Community for Interix, SUA and SFUInterix / SUA