Hi,
I'm implementing some file operations using the file.copy() method. Is there any way to either preserve the timestamp of the original file, or re-set the timestamp on the copy to the same value as the source file after copying?
Sub SetLastModified(Dir As String, FileName As String, Time As Long) As Boolean
Dim jo As JavaObject
jo.InitializeNewInstance("java.io.File", Array As Object(Dir, FileName))
Return jo.RunMethod("setLastModified", Array As Object(Time))
End Sub
Thanks Erel,
The code works, but unfortunately I'm on a Note 10.1 and have the same problem as many other users.
Hopefully this will resolve with later versions of Android.
Andrew