PlatformCommands

org.llm4s.speech.util.PlatformCommands

Cross-platform command utilities for testing speech adapters. Automatically detects OS and provides appropriate safe commands.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def cat: Seq[String]

Get a safe file content command for the current platform. Windows: cmd /c type POSIX: cat

Get a safe file content command for the current platform. Windows: cmd /c type POSIX: cat

Attributes

def echo: Seq[String]

Get a safe echo command for the current platform. Windows: cmd /c echo POSIX: echo

Get a safe echo command for the current platform. Windows: cmd /c echo POSIX: echo

Attributes

def isCommandAvailable(command: String): Boolean

Check if a command is available on the current platform.

Check if a command is available on the current platform.

Attributes

def ls: Seq[String]

Get a safe directory listing command for the current platform. Windows: cmd /c dir POSIX: ls

Get a safe directory listing command for the current platform. Windows: cmd /c dir POSIX: ls

Attributes

def mockFileReader: Seq[String]

Get a command that reads a file and outputs its content for testing. This is useful for simulating Whisper output.

Get a command that reads a file and outputs its content for testing. This is useful for simulating Whisper output.

Attributes

def mockSuccess: Seq[String]

Get a command that always succeeds for testing purposes. This is useful when you need a mock command that doesn't fail.

Get a command that always succeeds for testing purposes. This is useful when you need a mock command that doesn't fail.

Attributes

def platformName: String

Get the current platform name for logging/debugging.

Get the current platform name for logging/debugging.

Attributes