Raxol.Core.SystemInteraction behaviour (Raxol v0.4.0)

View Source

Defines a behaviour for interacting with the operating system, allowing for mocking.

Summary

Callbacks

Finds an executable like System.find_executable/1

Returns the OS type like :os.type()

Executes a system command like System.cmd/3

Callbacks

find_executable(binary)

@callback find_executable(binary()) :: binary() | nil

Finds an executable like System.find_executable/1

get_os_type()

@callback get_os_type() :: {:unix, atom()} | {:win32, atom()}

Returns the OS type like :os.type()

system_cmd(binary, list, keyword)

@callback system_cmd(binary(), [binary()], keyword()) :: {binary(), non_neg_integer()}

Executes a system command like System.cmd/3