Skip to main content
Version: Next

File Reader

The File Reader treats a text file as a Zaparoo reader. When the file contains text, Core reads that text as a ZapScript token. When the file is empty, the token is removed.

This is useful for scripts, local tools, and automation that need to trigger Zaparoo without physical reader hardware.

Platforms

Configure the reader

Add a file reader to your config.toml:

[[readers.connect]]
driver = 'file'
path = '/tmp/zaparoo-token.txt'

On Windows, use an absolute path to a writable location:

[[readers.connect]]
driver = 'file'
path = 'C:/zaparoo/input.txt'

The path must be absolute. The parent directory must already exist, but Core creates the watched file if it is missing when the reader starts.

Use the file

Write token text or ZapScript into the file to scan it:

echo "**launch.random:SNES" > /tmp/zaparoo-token.txt

Clear the file to remove the active token:

echo "" > /tmp/zaparoo-token.txt

On Windows PowerShell:

Set-Content -Path C:/zaparoo/input.txt -Value '**launch.random:SNES'
Clear-Content -Path C:/zaparoo/input.txt

Behavior notes

  • Core checks the file about every 100 ms.
  • Surrounding whitespace is trimmed, including trailing newlines.
  • Empty or whitespace-only file contents mean there is no active token.
  • Writing different text scans a new token.
  • Writing the same trimmed text again is ignored as a duplicate.
  • You can control the token text only. UID is not configurable through this reader.
  • Writing physical tokens through the File Reader is not supported.

Troubleshooting

If changes are not detected, check these first:

  • The path in config.toml is absolute.
  • The parent directory exists.
  • Zaparoo Core can read and write the file.
  • Core was restarted after changing config.toml.
  • The file contains non-whitespace text when you expect a scan.

Clear the file contents to remove the token. Do not delete the watched file while Core is running. If the file was deleted and scans stop, recreate the file and restart Core.