Android Question Compare DirAssets and DirInternal db

ALBRECHT

Active Member
Licensed User
Hello,

when i compare that 2 files :

That is Because i regulary update the tables inside "strings.db" file from the "DB Brower SqlLite" tools

B4X:
'LocalStrings ***************************************************************
    Dim FileName As String = "strings.db"
    Dim TargetDir As String = File.DirInternal

    If File.Exists(TargetDir, FileName) = False Then
        File.Copy(File.DirAssets, FileName, TargetDir, FileName)
        Log("Copy File")
    Else
        If File.Size(File.DirAssets, FileName) = File.Size(File.DirInternal, FileName) Then
            Log("Same File")
        Else
            File.Delete(TargetDir, FileName)
            File.Copy(File.DirAssets, FileName, TargetDir, FileName)
            Log("Copy File Again")
        End If
    End If

Even i check with File.Size or File.LastModified, the Log line is always : "Copy File Again"

- Is it a coding mistake ?

- Or is there an other way to compare that 2 files ?


Thanks
Michel

 

ALBRECHT

Active Member
Licensed User
ok Erel, it was simply to avoid unnecessary transactions, but in fact the .db file size is less than 800Ko
 
Upvote 0
Top