Logo Paket

ProcessHelper Module

Types

Type Description

ProcessResult

A process result including error code, message log and errors.

Functions and values

Function or value Description

ExecProcessAndReturnMessages configProcessStartInfoF timeOut

Full Usage: ExecProcessAndReturnMessages configProcessStartInfoF timeOut

Parameters:
Returns: ProcessResult
 Runs the given process and returns the process result.
 ## Parameters

  - `configProcessStartInfoF` - A function which overwrites the default ProcessStartInfo.
  - `timeOut` - The timeout for the process.
configProcessStartInfoF : ProcessStartInfo -> unit
timeOut : TimeSpan
Returns: ProcessResult

ExecProcessWithLambdas configProcessStartInfoF timeOut silent errorF messageF

Full Usage: ExecProcessWithLambdas configProcessStartInfoF timeOut silent errorF messageF

Parameters:
    configProcessStartInfoF : ProcessStartInfo -> unit
    timeOut : TimeSpan
    silent : bool
    errorF : string -> unit
    messageF : string -> unit

Returns: int
 Runs the given process and returns the exit code.
 ## Parameters

  - `configProcessStartInfoF` - A function which overwrites the default ProcessStartInfo.
  - `timeOut` - The timeout for the process.
  - `silent` - If this flag is set then the process output is redirected to the given output functions `errorF` and `messageF`.
  - `errorF` - A function which will be called with the error log.
  - `messageF` - A function which will be called with the message log.
configProcessStartInfoF : ProcessStartInfo -> unit
timeOut : TimeSpan
silent : bool
errorF : string -> unit
messageF : string -> unit
Returns: int

directExec configProcessStartInfoF

Full Usage: directExec configProcessStartInfoF

Parameters:
Returns: bool

Runs the given process, waits for its completion and returns if it succeeded.

configProcessStartInfoF : ProcessStartInfo -> unit
Returns: bool

environVarOrNone name

Full Usage: environVarOrNone name

Parameters:
    name : string

Returns: string option

Retrieves the environment variable or None

name : string
Returns: string option

fireAndForget configProcessStartInfoF

Full Usage: fireAndForget configProcessStartInfoF

Parameters:

Starts the given process and returns immediatly.

configProcessStartInfoF : ProcessStartInfo -> unit

isValidPath path

Full Usage: isValidPath path

Parameters:
    path : string

Returns: bool

Detects whether the given path does not contains invalid characters.

path : string
Returns: bool

pathDirectories

Full Usage: pathDirectories

Returns: string seq

Gets the list of valid directories included in the PATH environment variable.

Returns: string seq

platformInfoAction psi

Full Usage: platformInfoAction psi

Parameters:

Modifies the ProcessStartInfo according to the platform semantics

psi : ProcessStartInfo

separated delimiter items

Full Usage: separated delimiter items

Parameters:
    delimiter : string
    items : string seq

Returns: string
Modifiers: inline

Converts a sequence of strings to a string with delimiters

delimiter : string
items : string seq
Returns: string

splitEnvironVar name

Full Usage: splitEnvironVar name

Parameters:
    name : string

Returns: string list

Splits the entries of an environment variable and removes the empty ones.

name : string
Returns: string list

toLines text

Full Usage: toLines text

Parameters:
    text : string seq

Returns: string
Modifiers: inline

Converts a sequence of strings into a string separated with line ends

text : string seq
Returns: string

tryFindFileOnPath file

Full Usage: tryFindFileOnPath file

Parameters:
    file : string

Returns: string option
 Searches the current directory and the directories within the PATH
 environment variable for the given file. If successful returns the full
 path to the file.
 ## Parameters
  - `file` - The file to locate
file : string
Returns: string option

Type something to start searching.