touch.3 revision da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin.ds ;G \\*(;G\\f\\$1\\$3\\f\\$2
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin.if !\\$4 .Af \\$2 \\$1 "\\$4" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin.ie \\$3 .ft \\$1
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin.nr ;G \\n(.f
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin.Af "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin.ft \\n(;G \}
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin.aF 5 \\n(.f "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin.aF 5 1 "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin.aF 1 5 "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin.de EX \" start example
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin.ta 1i 2i 3i 4i 5i 6i
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin.de EE \" end example
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin.TH TOUCH 3
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chintouch \- set file access and modify times
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin.SH SYNOPSIS
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin.L "#include <ast.h>"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin.L "int touch(const char* path, time_t atime, time_t mtime, int force);"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin.SH DESCRIPTION
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinsets the access and modify times of the file named by
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin.L "force != 0"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinthen the file is created if it doesn't exist;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinotherwise the file is not created and
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinis returned.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin.L "force < 0"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinare taken verbatim; otherwise
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin.L "(time_t)(-1)"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinretains the current value for the file and
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin.L "(time_t)(0)"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinuses the current time.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin.SH CAVEATS
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinBy default the change time is always changed to the current time.