Maya Docs
  • Introducing Maya
  • Product
    • Command Bar
    • Workspaces
      • Importing JSON Workflows
    • Modules
      • Config Profiles
    • Node Library
      • Common
        • Inject
        • Debug
        • Complete
        • Catch
        • Status
      • Functions
        • Function
        • Change
        • Switch
        • Template
        • Range
        • Delay
        • Trigger
        • Filter
        • Exec
      • Storage
        • Read File
        • Modify File
        • Watch Files
      • Parser
        • CSV
        • HTML
        • JSON
        • XML
        • YAML
      • Sequence
        • Split Into Array
        • Join Array
        • Sort Array
        • Batch Messages
      • Dashboard
        • Button
        • Chart
        • Slider
        • Gauge
        • Switch
        • Dropdown
        • Numeric Input
        • Text Input
        • Template
        • Date Picker
        • Colour Picker
        • Form
        • Display Text
        • Audio Out
      • Network
        • Websockets
          • Websocket Out
          • Websocket In
        • HTTP
          • HTTP In
          • HTTP Response
          • HTTP Request
      • Command Bar
        • Bot Scheduler
        • Bot Command In
        • Bot Command Out
          • Bot Response
          • Bot Web Card
          • Bot Dash Card
        • Custom Search In
        • Custom Search Out
        • Bot Info
      • Spotify
        • Get Playback State
        • Control Playback
        • Play
        • Library
        • Playlist
        • Search
    • Web Extension
      • Selecting Elements
      • Making a web automation skill in 5 minutes
    • Troubleshooting
    • Changelog
  • Tutorials
    • Install skills/modules from store
    • Building fundamentals
    • Connect different services
      • Spotify + Figma
      • Zoom + Google Calendar
    • Browser Automation
      • Control YouTube - Easy
      • Scrape Twitter - Moderate
      • Manage Gmail Inbox - Hard
Powered by GitBook
On this page
  • Inputs
  • Outputs
  • Details

Was this helpful?

  1. Product
  2. Node Library
  3. Storage

Watch Files

Watches a directory or file for changes.

PreviousModify FileNextParser

Last updated 3 years ago

Was this helpful?

Inputs

This is a trigger node so it has no inputs.

Outputs

The full filename of the file that actually changed is put into msg.payload and msg.filename, while a stringified version of the watch list is returned in msg.topic.

Details

You can enter a list of comma separated directories and/or files. You will need to put quotes "..." around any that have spaces in.

On Windows you must use double back-slashes \\ in any directory names.

The full filename of the file that actually changed is put into msg.payload and msg.filename, while a stringified version of the watch list is returned in msg.topic.

msg.file contains just the short filename of the file that changed. msg.type has the type of thing changed, usually file or directory, while msg.size holds the file size in bytes.

Of course in Linux, everything is a file and thus can be watched...

**Note: **The directory or file must exist in order to be watched. If the file or directory gets deleted it may no longer be monitored even if it gets re-created.