Lines Matching refs:times

79 utimes_helper(File& file, const struct timespec times[2])
81 if (times == NULL)
85 timeBuffer[0].tv_sec = times[0].tv_sec;
86 timeBuffer[0].tv_usec = times[0].tv_nsec / 1000;
87 timeBuffer[1].tv_sec = times[1].tv_sec;
88 timeBuffer[1].tv_usec = times[1].tv_nsec / 1000;
90 if (times[0].tv_nsec == UTIME_OMIT || times[1].tv_nsec == UTIME_OMIT) {
95 if (times[0].tv_nsec == UTIME_OMIT && times[1].tv_nsec == UTIME_OMIT)
98 if (times[0].tv_nsec == UTIME_OMIT) {
103 if (times[1].tv_nsec == UTIME_OMIT) {
109 if (times[0].tv_nsec == UTIME_NOW || times[1].tv_nsec == UTIME_NOW) {
113 if (times[0].tv_nsec == UTIME_NOW)
116 if (times[1].tv_nsec == UTIME_NOW)
140 int SetTimes(const timeval times[2])
142 return futimes(fFD, times);
151 futimens(int fd, const struct timespec times[2])
154 return utimes_helper(file, times);
175 int SetTimes(const timeval times[2])
178 return futimesat(fFD, fPath, times);
189 utimensat(int fd, const char* path, const struct timespec times[2], int flag)
192 return utimes_helper(file, times);
941 // Grab the previous mod and access times so we only overwrite
949 struct timespec times[2];
950 times[0] = (statMask & B_STAT_ACCESS_TIME)
952 times[1] = (statMask & B_STAT_MODIFICATION_TIME)
954 if (futimens(realFD, times) < 0)
985 // Grab the previous mod and access times so we only overwrite
1265 _haiku_build_utimensat(int fd, const char* path, const struct timespec times[2],
1269 return utimensat(fd, path, times, flag);
1277 if (times == NULL || times[0].tv_nsec == UTIME_NOW
1278 || times[1].tv_nsec == UTIME_NOW) {
1287 if (times != NULL) {
1289 if (times[0].tv_nsec != UTIME_OMIT) {
1292 if (times[0].tv_nsec != UTIME_NOW) {
1293 if (times[0].tv_nsec < 0 || times[0].tv_nsec > 999999999)
1297 HAIKU_HOST_STAT_ATIM(stat) = times[0];
1301 if (times[1].tv_nsec != UTIME_OMIT) {
1304 if (times[1].tv_nsec != UTIME_NOW) {
1305 if (times[1].tv_nsec < 0 || times[1].tv_nsec > 999999999)
1309 HAIKU_HOST_STAT_MTIM(stat) = times[1];
1314 // set the times -- as per spec we even need to do this, if both have
1324 _haiku_build_futimens(int fd, const struct timespec times[2])
1326 return _haiku_build_utimensat(fd, NULL, times, AT_SYMLINK_NOFOLLOW);