Update file content after seconds if the content of the file changes.

52 views
Skip to first unread message

Thiemo Melhorn

unread,
Jun 4, 2024, 6:33:07 AMJun 4
to DroidScript
Hello everyone, 

I would like to know what the code for updating a file is called. I have already made it so that when a file is selected, it is also displayed in the tab of my web browser. Now I would like the new tab with the file to be updated when the file changes.

Dave

unread,
Jun 4, 2024, 1:53:14 PMJun 4
to DroidScript
DS does not support the FileObserver object, but you could either - 

1. Use setInterval() to run a callback that checks if the file date has changes and refresh the browser if so.

2. Write a DS plugin to make use of the FileObserver 

3. Try using a Node.js background task to watch for changes (never tried this) 
Reply all
Reply to author
Forward
0 new messages