Options
All
  • Public
  • Public/Protected
  • All
Menu

Class NsfwFileSystemWatcherServer

deprecated

since 1.6.0 use NsfwFileSystemWatcherService instead.

Hierarchy

  • NsfwFileSystemWatcherServer

Implements

Index

Constructors

constructor

  • new NsfwFileSystemWatcherServer(options?: { error?: (message: string, ...args: any[]) => void; info?: (message: string, ...args: any[]) => void; nsfwOptions?: Options; verbose?: boolean }): NsfwFileSystemWatcherServer
  • Parameters

    • Optional options: { error?: (message: string, ...args: any[]) => void; info?: (message: string, ...args: any[]) => void; nsfwOptions?: Options; verbose?: boolean }
      • Optional error?: (message: string, ...args: any[]) => void
          • (message: string, ...args: any[]): void
          • Parameters

            • message: string
            • Rest ...args: any[]

            Returns void

      • Optional info?: (message: string, ...args: any[]) => void
          • (message: string, ...args: any[]): void
          • Parameters

            • message: string
            • Rest ...args: any[]

            Returns void

      • Optional nsfwOptions?: Options
      • Optional verbose?: boolean

    Returns NsfwFileSystemWatcherServer

Properties

Protected changes

changes: FileChangeCollection = ...

Protected client

client: undefined | FileSystemWatcherClient

Protected Readonly fireDidFilesChanged

fireDidFilesChanged: () => void = ...

Fires file changes to clients. It is debounced in the case if the filesystem is spamming to avoid overwhelming clients with events.

Type declaration

    • (): void
    • Returns void

Protected Readonly options

options: { error: (message: string, ...args: any[]) => void; info: (message: string, ...args: any[]) => void; nsfwOptions: Options; verbose: boolean }

Type declaration

  • error: (message: string, ...args: any[]) => void
      • (message: string, ...args: any[]): void
      • Parameters

        • message: string
        • Rest ...args: any[]

        Returns void

  • info: (message: string, ...args: any[]) => void
      • (message: string, ...args: any[]): void
      • Parameters

        • message: string
        • Rest ...args: any[]

        Returns void

  • nsfwOptions: Options
  • verbose: boolean

Protected Readonly toDispose

toDispose: DisposableCollection = ...

Protected Readonly watcherOptions

watcherOptions: Map<number, WatcherOptions> = ...

Protected watcherSequence

watcherSequence: number = 1

Protected Readonly watchers

watchers: Map<number, Disposable> = ...

Methods

Protected debug

  • debug(message: string, ...params: any[]): void

dispose

  • dispose(): void

Protected doFireDidFilesChanged

  • doFireDidFilesChanged(): void

Protected isIgnored

  • isIgnored(watcherId: number, path: string): boolean

Protected pushAdded

  • pushAdded(watcherId: number, path: string): void

Protected pushDeleted

  • pushDeleted(watcherId: number, path: string): void

Protected pushFileChange

  • pushFileChange(watcherId: number, path: string, type: FileChangeType): void

Protected pushUpdated

  • pushUpdated(watcherId: number, path: string): void

Protected resolvePath

  • resolvePath(directory: string, file: string): string

setClient

Protected start

  • start(watcherId: number, basePath: string, rawOptions: undefined | WatchOptions, toDisposeWatcher: DisposableCollection): Promise<void>

unwatchFileChanges

  • unwatchFileChanges(watcherId: number): Promise<void>

watchFileChanges

  • watchFileChanges(uri: string, options?: WatchOptions): Promise<number>