How to: run a subprocess

Hi! Is there any way to run some additional file/process on host system?

My case:
I have a set of files (defined by user) and I need to react if any of them have been changed.
So, the idea was to use background plugin to run some script (js/exe) that would have access to file system watcher and could send info about changed files to background plugin.

Platform: windows, desktop editors.

Hello @scoolnik

I believe you can rely on FileSystemWatcher Change event to detect if any of specified files was changed.

“background plugin” is mentioned here two times, are you talking about the same plugin for system?

In general, it is not quite clear what kind of Desktop Editor process you’d like to run on host system. Can you share some more details about that?

Hi!
How can i access FileSystemWatcher from editor?

By “background plugin” i meant plugin variation with ‘isSystem=true’ in config

I hope this picture will help you to understand my idea:
i

According to your goal, you would like to detect if specific file was modified (opened, changed, etc), the key point to understand is that the FileSystemWatcher class (including Change) only detects changes to files and directories within its specified scope (i.e. monitored directory and its subdirectories). It does not have access to information about which application or process modified the file. The event is triggered solely based on the operating system’s notifications.

That said, I’m not sure if your goal has anything to do with plugin for Desktop Editor. If I am missing something, please let me know.