File modification time: Difference between revisions
Content added Content deleted
(→{{header|REXX}}: added the REXX language.) |
|||
Line 1,033: | Line 1,033: | ||
End Function</lang> |
End Function</lang> |
||
=={{header|REXX}}== |
|||
{{works with|Regina REXX}} |
|||
The REXX language has no facility to update a file's modification time. |
|||
<lang rexx>/*REXX program (Regina) to obtain/display a file's time of modification. */ |
|||
parse arg $ . /*get the fileID from the CL*/ |
|||
if $=='' then do; say "***error*** no filename was specified."; exit 13; end |
|||
q=stream($, 'C', "QUERY TIMESTAMP") /*get file's mod time info. */ |
|||
if q=='' then q="specified file doesn't exist." /*give an error indication. */ |
|||
say 'For file: ' $ /*display the file ID. */ |
|||
say 'timestamp of last modification: ' q /*display modification time.*/ |
|||
/*stick a fork in it, we're all done. */</lang> |
|||
=={{header|Ruby}}== |
=={{header|Ruby}}== |
||
Line 1,046: | Line 1,058: | ||
#Set the access and modification times to the current time: |
#Set the access and modification times to the current time: |
||
File.utime(nil, nil, 'path')</lang> |
File.utime(nil, nil, 'path')</lang> |
||
=={{header|Run BASIC}}== |
=={{header|Run BASIC}}== |