BLUE
PHP 7.4.33
Path:
/var/www/uibuilder.cmshelp.dk/httpdocs/node_modules/metro-file-map/src/watchers
Run
Logout
Edit File
Size: 2.04 KB
Close
/var/www/uibuilder.cmshelp.dk/httpdocs/node_modules/metro-file-map/src/watchers/AbstractWatcher.js.flow
Text
Base64
/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @format * @flow strict-local */ import type {WatcherBackend, WatcherBackendChangeEvent} from '../flow-types'; import {posixPathMatchesPattern} from './common'; import EventEmitter from 'events'; import * as path from 'path'; export type Listeners = $ReadOnly<{ onFileEvent: (event: WatcherBackendChangeEvent) => void, onError: (error: Error) => void, }>; export class AbstractWatcher implements WatcherBackend { +root: string; +ignored: ?RegExp; +globs: $ReadOnlyArray<string>; +dot: boolean; +doIgnore: (path: string) => boolean; #emitter: EventEmitter = new EventEmitter(); constructor( dir: string, { ignored, globs, dot, }: $ReadOnly<{ ignored: ?RegExp, globs: $ReadOnlyArray<string>, dot: boolean, ... }>, ) { this.dot = dot || false; this.ignored = ignored; this.globs = globs; this.doIgnore = ignored ? (filePath: string) => posixPathMatchesPattern(ignored, filePath) : () => false; this.root = path.resolve(dir); } onFileEvent( listener: (event: WatcherBackendChangeEvent) => void, ): () => void { this.#emitter.on('fileevent', listener); return () => { this.#emitter.removeListener('fileevent', listener); }; } onError(listener: (error: Error) => void): () => void { this.#emitter.on('error', listener); return () => { this.#emitter.removeListener('error', listener); }; } async startWatching(): Promise<void> { // Must be implemented by subclasses } async stopWatching() { this.#emitter.removeAllListeners(); } emitFileEvent(event: Omit<WatcherBackendChangeEvent, 'root'>) { this.#emitter.emit('fileevent', { ...event, root: this.root, }); } emitError(error: Error) { this.#emitter.emit('error', error); } getPauseReason(): ?string { return null; } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 12
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
AbstractWatcher.js
2.17 KB
lrw-r--r--
2025-03-28 11:04:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
AbstractWatcher.js.flow
2.04 KB
lrw-r--r--
2025-03-28 11:04:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
common.js
1.11 KB
lrw-r--r--
2025-03-28 11:04:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
common.js.flow
2.38 KB
lrw-r--r--
2025-03-28 11:04:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
FallbackWatcher.js
8.43 KB
lrw-r--r--
2025-03-28 11:04:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
FallbackWatcher.js.flow
11.65 KB
lrw-r--r--
2025-03-28 11:04:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
NativeWatcher.js
3.02 KB
lrw-r--r--
2025-03-28 11:04:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
NativeWatcher.js.flow
3.77 KB
lrw-r--r--
2025-03-28 11:04:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
RecrawlWarning.js
1.16 KB
lrw-r--r--
2025-03-28 11:04:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
RecrawlWarning.js.flow
1.73 KB
lrw-r--r--
2025-03-28 11:04:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
WatchmanWatcher.js
8.73 KB
lrw-r--r--
2025-03-28 11:04:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
WatchmanWatcher.js.flow
9.21 KB
lrw-r--r--
2025-03-28 11:04:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).