Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

Latest commit

 

History

History
66 lines (55 loc) · 4.94 KB

cp.sourcewatcher.md

File metadata and controls

66 lines (55 loc) · 4.94 KB

docs » cp.sourcewatcher


Watches folders for specific file extensions and reloads the app if they change.

API Overview

API Documentation

Methods

Signature cp.sourcewatcher:filesChanged(files, flagTables) -> boolean
Type Method
Description Checks that the file that triggered the Path Watcher matches the extension given.
Parameters
  • files - Table of files to check as strings
  • flagTables - Table of flagTables (see: hs.pathwatcher.new)
Returns
  • None
Signature cp.sourcewatcher:matchesExtensions(file) -> boolean
Type Method
Description Checks that the file that triggered the Path Watcher matches the extension given.
Parameters
  • file - The file as string
Returns
  • A boolean value
Signature cp.sourcewatcher.new(extensions) -> sourcewatcher
Type Method
Description Creates a new sourcewatcher instance.
Parameters
  • extensions - Extensions
Returns
  • A sourcewatcher instance
Signature cp.sourcewatcher:start() -> none
Type Method
Description Starts a Source Watcher.
Parameters
  • None
Returns
  • None
Signature cp.sourcewatcher:stop() -> none
Type Method
Description Stops a Source Watcher.
Parameters
  • None
Returns
  • None
Signature cp.sourcewatcher:watchPath(path) -> sourcewatcher
Type Method
Description Watches a path.
Parameters
  • path - The path you want to watch as a string.
Returns
  • sourcewatcher