|
|
|
| 2 July 2002 | Touch() |
| Author | Alex Heylin |
| Action | Touches the save time on the file to current time. If the files doesn't exist, it is created as empty. |
| Syntax | Touch (file) |
| Parameters | |
| Remarks | Assumes FileNumber 9 isn't in use. |
| Returns | -3 File number already in use -2 Invalid file number specified -1 Invalid file name specified 0 File opened successfully >0 System error |
| Dependencies | None. |
| Examples |
IF (Touch("C:\test-touch-file.txt") = 0)
? "File was touched OK"
ELSE
? "Error touching file - error: @error (@serror)"
ENDIF
|
| Source |
FUNCTION Touch ($touchfile)
; Author: Alex Heylin - kix@alexheylin.com
; Purpose: Touches the save time on the file to current time
;
; if the files doesn't exist, it is created as empty.
$rc=Open(9, "$TouchFile", 5)
IF $rc = 0
$rc=Close(9)
ENDIF
$touch=@error
ENDFUNCTION ; - Touch -
|
|
|
|