PS7Zip.psm1

<#
    Parts of this modules use the 7-Zip program.
    7-Zip is licensed under the GNU LGPL license.
    www.7-zip.org
#>


# Set OSArchitecture
$OSArchitecture = Get-WmiObject Win32_OperatingSystem | Select -ExpandProperty OSArchitecture

# Test if 7zaBinary variable is set
If (!(Test-Path Variable:Global:7zaBinary )) {
    $Global:7zaBinary = "$PSScriptRoot\Bin\$OSArchitecture\7za.exe"
}

# Test if 7zaBinary is accessible
If (!(Test-Path $7zaBinary)) {
    Write-Error "7za.exe binary file could not be found"
}

# Dot source the modules functions
. "$PSScriptRoot\Compress-7Zip.ps1"
. "$PSScriptRoot\Expand-7Zip.ps1"
. "$PSScriptRoot\Get-7Zip.ps1"