How to use the @theia/filesystem/lib/browser/filesystem-watcher.FileChangeType.UPDATED function in @theia/filesystem

To help you get started, we’ve selected a few @theia/filesystem examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github eclipse-theia / theia / packages / userstorage / src / browser / user-storage-service-filesystem.spec.ts View on Github external
it('Should return notify client when resource changed underneath', done => {
        userStorageResource.onDidChangeContents(() => {
            done();
        });

        mockOnFileChangedEmitter.fire([
            {
                type: FileChangeType.UPDATED,
                uri: userStorageFolder.resolve(testFile)
            }
        ]);
    }).timeout(2000);
github eclipse-theia / theia / packages / userstorage / src / browser / user-storage-service-filesystem.spec.ts View on Github external
it('Should register a client and notifies it of the fs changesby converting them to user storage changes', done => {
        userStorageService.onUserStorageChanged(event => {
            const userStorageUri = event.uris[0];
            expect(userStorageUri.scheme).eq(UserStorageUri.SCHEME);
            expect(userStorageUri.path.toString()).eq(testFile);
            done();
        });

        mockOnFileChangedEmitter.fire([
            {
                type: FileChangeType.UPDATED,
                uri: userStorageFolder.resolve(testFile)
            }
        ]);

    }).timeout(2000);
github eclipse-theia / theia / packages / plugin-ext / src / main / browser / in-plugin-filesystem-watcher-manager.ts View on Github external
protected onFilesChangedEventHandler(changes: FileChangeEvent): void {
        for (const change of changes) {
            switch (change.type) {
                case FileChangeType.UPDATED:
                    for (const [id, subscriber] of this.subscribers) {
                        if (!subscriber.ignoreChangeEvents && this.uriMatches(subscriber, change)) {
                            subscriber.proxy.$fileChanged({ subscriberId: id, uri: theiaUritoUriComponents(change.uri), type: 'updated' });
                        }
                    }
                    break;
                case FileChangeType.ADDED:
                    for (const [id, subscriber] of this.subscribers) {
                        if (!subscriber.ignoreCreateEvents && this.uriMatches(subscriber, change)) {
                            subscriber.proxy.$fileChanged({ subscriberId: id, uri: theiaUritoUriComponents(change.uri), type: 'created' });
                        }
                    }
                    break;
                case FileChangeType.DELETED:
                    for (const [id, subscriber] of this.subscribers) {
                        if (!subscriber.ignoreDeleteEvents && this.uriMatches(subscriber, change)) {