How to detect changes happening in the workspace? #14360
-
I want to monitor changes in the open workspace, such as file creation, deletion, saving, and renaming. Is there an existing service that provides these events? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hey @YathindraNikshipth, you can use the theia/packages/collaboration/src/browser/collaboration-instance.ts Lines 472 to 517 in bcf96a3 |
Beta Was this translation helpful? Give feedback.
Hey @YathindraNikshipth,
you can use the
FileService
service to register the appropriate events. Note that there are two different kinds of workspace changes; Those who are happening on the file system (from the outside) and those initiated by the user. Here's an example on how to hook into both:theia/packages/collaboration/src/browser/collaboration-instance.ts
Lines 472 to 517 in bcf96a3