Sentix v1.0.1 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
Provides the location of the fswatch
executable
Functions
Specs
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.
Specs
generate!(binary :: binary, options :: [binary], paths :: [binary]) :: flags :: [[char]]
Functionally identical to generate/1
, but extracts the options instead of returning
as a Tuple.