[Gambas-user] inotify
vuott at tutanota.com
vuott at tutanota.com
Tue Sep 12 00:17:35 CEST 2023
...maybe:
[code]
Private dr As String
Private lun As String
Private fl As File
Public Sub Main()
dr = "/proc/self/mountstats"
lun = File.Load(dr)
fl = Open dr For Read Watch
End
Public Sub File_Read()
Dim s As String
If Exist(dr) Then
s = File.Load(dr)
If lun <> s Then
Print "File '"; dr; "' has been modified !\n" Print s
Endif
lun = s
Else
Print "\nfile '"; dr; "' was destroyed !" fl.Close
Endif
End[/code]
11 set 2023, 19:38 da gambas.fr at gmail.com:
> hi,
>
> is it possible to watch a file in the /proc path ?
>
> I'm trying to watch /proc/self/mountstats... but I'm not able to catch the file modification :-/
>
> any idea ?
>
> --
> Fabien Bodard
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20230912/e4a7fa41/attachment.htm>
More information about the User
mailing list