invalid
invalid

Reputation: 1505

How can I detect file change from outside in VSCode Extension?

I have a file foo.txt and open it with my Custom Editor Extension.
When my extension edit it, I can know the change by fire onDidChangeDocument Event.
But how can I know change from outside?
For example, I should update my web-view when some other program edit foo.txt.

Upvotes: 0

Views: 1738

Answers (1)

rioV8
rioV8

Reputation: 28653

You use a FileSystemWatcher.

Also read: FileSystemProvider.

Upvotes: 1

Related Questions