Task

Get and set the modification time of a file.




' There is no built in command in Gambas to 'set' the modification time of a file
' A shell call to 'touch' would do it
 
Public Sub Main()
Dim stInfo As Stat = Stat(User.home &/ "Rosetta.txt")
 
Print "Rosetta.txt was last modified " & Format(stInfo.LastModified, "dd/mm/yyy hh:nn:ss")
 
End