int smbc_utime(const char *fname, struct utimbuf *utbuf) { struct timeval tv[2]; if (utbuf == NULL) return smbc_getFunctionUtimes(statcont)(statcont, fname, NULL); tv[0].tv_sec = utbuf->actime; tv[1].tv_sec = utbuf->modtime; tv[0].tv_usec = tv[1].tv_usec = 0; return smbc_getFunctionUtimes(statcont)(statcont, fname, tv); }
int SmbFs::fs_utime(const char *path, struct utimbuf *buf) { QMutexLocker locker(&_mutex); struct timeval tbuf[2]; tbuf[0].tv_sec = buf->actime; tbuf[0].tv_usec = 0; tbuf[1].tv_sec = buf->modtime; tbuf[1].tv_usec = 0; if((smbc_getFunctionUtimes(_ctx))(_ctx, qPrintable(getPath(path)),tbuf) == 0) return(0); else return(-errno); }
int smbc_utimes(const char *fname, struct timeval *tbuf) { return smbc_getFunctionUtimes(statcont)(statcont, fname, tbuf); }