Private/New-SpecModuleStructure.ps1

function New-SpecModuleStructure {
    [cmdletbinding()]

    param (
        [parameter (mandatory = $true)]
        [string]$moduleName,

        [parameter (mandatory = $true)]
        [string]$modulePath
    )

    try {

        write-verbose "creating root directory: $(Join-Path $modulePath $moduleName)"
        New-Item -Path $modulePath -Name $moduleName -ItemType Directory -ErrorAction Stop | Out-Null

        $fullModulePath = Join-Path $modulePath $moduleName

        write-verbose "Creating Public folder: $fullModulePath\Public"
        New-Item -Path $fullModulePath -Name 'Public' -ItemType Directory -ErrorAction Stop | Out-Null

        write-verbose "Creating Private folder: $fullModulePath\Private"
        New-Item -Path $fullModulePath -Name 'Private' -ItemType Directory -ErrorAction Stop | Out-Null

        write-verbose "Creating Private folder: $fullModulePath\en-US"
        New-Item -Path $fullModulePath -Name 'en-US' -ItemType Directory -ErrorAction Stop | Out-Null

        return $true
    } catch {
        return $false
    }
}