watch(path, _options) {
        return new Observable_1.Observable(obs => {
            const opts = { persistent: false };
            const watcher = new FSWatcher(opts).add(this._getSystemPath(path));
            watcher
                .on('change', path => {
                obs.next({
                    path: core_1.normalize(path),
                    time: new Date(),
                    type: 0 /* Changed */,
                });
            })
                .on('add', path => {
                obs.next({
                    path: core_1.normalize(path),
                    time: new Date(),
                    type: 1 /* Created */,
                });
            })
                .on('unlink', path => {
                obs.next({
                    path: core_1.normalize(path),
                    time: new Date(),
                    type: 2 /* Deleted */,
                });
            });
            return () => watcher.close();
        }).pipe(publish_1.publish(), refCount_1.refCount());
    }
// Some hosts may not support watching.
Some hosts may not support watching.
Some hosts may not support watching .
watch(path, _options) {
        return new Observable_1.Observable(obs => {
            const opts = { persistent: false };
            const watcher = new FSWatcher(opts).add(this._getSystemPath(path));
            watcher
                .on('change', path => {
                obs.next({
                    path: core_1.normalize(path),
                    time: new Date(),
                    type: 0 ,
                });
            })
                .on('add', path => {
                obs.next({
                    path: core_1.normalize(path),
                    time: new Date(),
                    type: 1 ,
                });
            })
                .on('unlink', path => {
                obs.next({
                    path: core_1.normalize(path),
                    time: new Date(),
                    type: 2 ,
                });
            });
            return () => watcher.close();
        }).pipe(publish_1.publish(), refCount_1.refCount());
    }
watch ( path , _options ) { return new Observable_1 . Observable ( obs => { const opts = { persistent : false } ; const watcher = new FSWatcher ( opts ) . add ( this . _getSystemPath ( path ) ) ; watcher . on ( 'change' , path => { obs . next ( { path : core_1 . normalize ( path ) , time : new Date ( ) , type : 0 , } ) ; } ) . on ( 'add' , path => { obs . next ( { path : core_1 . normalize ( path ) , time : new Date ( ) , type : 1 , } ) ; } ) . on ( 'unlink' , path => { obs . next ( { path : core_1 . normalize ( path ) , time : new Date ( ) , type : 2 , } ) ; } ) ; return ( ) => watcher . close ( ) ; } ) . pipe ( publish_1 . publish ( ) , refCount_1 . refCount ( ) ) ; }
Some hosts may not support watching.
Some hosts may not support watching .
/* Changed */ /* Created */ /* Deleted */