You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Touch - Sets access and modification time of file
380
+
// Original : https://www.php.net/manual/en/function.touch.php
381
+
// Attempts to set the access and modification times of the file named in the filename parameter to the value given in time. Note that the access time is always modified, regardless of the number of parameters.
382
+
// If the file does not exist, it will be created.
383
+
funcTouch(pathstring, tint64, atint64) bool {
384
+
385
+
_, err:=FOpen(path,os.O_RDWR)
386
+
iferr!=nil {
387
+
log.Fatal(err)
388
+
returnfalse
389
+
}
390
+
391
+
atim:=time.Unix(at, 0)
392
+
ttim:=time.Unix(t, 0)
393
+
394
+
395
+
iferr:=os.Chtimes(path,ttim,atim); err!=nil {
396
+
log.Fatal(err)
397
+
returnfalse
398
+
}
399
+
returntrue
400
+
}
401
+
402
+
379
403
// Unlink - Deletes a file.
380
404
// Original : https://www.php.net/manual/en/function.unlink.php
381
405
// Deletes filename. Similar to the Unix C unlink() function. An E_WARNING level error will be generated on failure.
0 commit comments