B4J Question jWatcher Count number of files modified

giga

Well-Known Member
Licensed User
Longtime User
Trying to wrap my head around something I think should be pretty basic. I need a numeric count of files that are modified using the jWatcher library. I tried this code and something is not right, any help is appreciated. THANK YOU ALL!

B4X:
Sub fw_ModificationDetected(FileName As String)
    
    Dim fn As Int = fw_ModificationDetected(FileName).Length
    
If fn > 4 Then
    Log("ModificationsDetected: " & fn )   "Logs the number of files modified
    
    End If
End Sub
 

EnriqueGonzalez

Well-Known Member
Licensed User
Longtime User
Dim fn As Int = fw_ModificationDetected(FileName).Length
You are creating an stackoverflow here. I don't think thats how it works.

Also fw modification detected sub doesn't return a value.

I have used that library before, your best bet is to use a global counter for every file that was modified.
 
Upvote 1
Top