If File.Exists(sourcefolder,Filename) Then
If ((lt > a_t) And (lt < b_t)) Then
wait for (File.CopyAsync(sourcefolder,Filename,Final,"/Current_Image.jpg")) complete(success As Boolean)
If success = True Then
Log("new image at " & local & " from " & Camera)
Log("." & success)
End If
' Dim fsize,zero=0 As Long
' Dim fis,fos As JavaObject
' Dim fsiCH, fsoCH As JavaObject
' fis.InitializeNewInstance("java.io.FileInputStream",Array(sourcefile))
' fos.InitializeNewInstance("java.io.FileOutputStream",Array(destfile))
' Dim start As Long = DateTime.Now
' Try
' fsiCH = fis.RunMethodJO("getChannel",Null)
' fsoCH = fos.RunMethodJO("getChannel",Null)
' fsize = fsiCH.RunMethod("size",Null)
'' Log("filesize : "& fsize)
' If fsiCH<>Null And fsoCH<>Null Then
' fsoCH.RunMethod("transferFrom",Array(fsiCH,zero,fsize))
' End If
' Catch
' Log("copy failed")
' Log(LastException.Message)
' End Try
' Try
' fsiCH.RunMethod("close",Null)
' fsoCH.RunMethod("close",Null)
' Catch
' Log("close failed")
' Log(LastException.Message)
' End Try
' fis.RunMethod("close",Null)
' fos.RunMethod("close",Null)
' Log("Loading time = " & (DateTime.Now - start) & " ms")
End If
End If