Lines Matching defs:file
34 * touch file access and modify times of file
35 * if force>0 then file will be created if it doesn't exist
73 touch(const char* file, time_t atime, time_t mtime, int force)
92 if (stat(file, &st)) st.st_atime = st.st_mtime = 0;
110 n = utime(file, (force < 0 || atime || mtime) ? &ut : (struct utimbuf*)0);
112 n = utime(file, &ut);
117 n = utime(file, ut);
137 if (access(file, F_OK))
143 if ((fd = open(file, O_WRONLY|O_CREAT|O_TRUNC|O_cloexec, mode)) < 0) return(-1);
149 return((force < 0 || atime || mtime) ? utime(file, &ut) : 0);
154 return((atime != now || mtime != now) ? utime(file, ut) : 0);
162 if (atime == now && mtime == now && (fd = open(file, O_RDWR|O_cloexec)) >= 0)
164 if ((fd = open(file, O_RDWR|O_cloexec)) >= 0)
183 if ((fd = open(file, O_WRONLY|O_CREAT|O_TRUNC|O_cloexec, mode)) >= 0)