Sentix v1.0.3 Sentix.Bridge.Command

This module provides command construction for executing fswatch. This module could easily live inside Sentix.Bridge but has been separated in order to ease testing.

Summary

Functions

Generates a flattened list of command segments which can be used to spawn an fswatch port

Functionally identical to generate/1, but extracts the options instead of returning as a Tuple

Functions

generate(exe, opts, paths)
generate(binary :: binary, options :: [binary], paths :: [binary]) :: {:ok, flags :: [[char]]}

Generates a flattened list of command segments which can be used to spawn an fswatch port.

We flatten everything down to a single level list, and convert all binaries to charlists. This is done using a custom recursion in order to aid performance.

generate!(exe, opts, paths)
generate!(binary :: binary, options :: [binary], paths :: [binary]) :: flags :: [[char]]

Functionally identical to generate/1, but extracts the options instead of returning as a Tuple.