Functions/Ses/Sesio-Init.ps1
function Sesio-Init { # Create the hidden .sesio directory if it doesn't exist $localSesioDir = ".sesio" if (-Not (Test-Path -Path $localSesioDir)) { New-Item -ItemType Directory -Path $localSesioDir -Force | Out-Null # Set the directory as hidden # (Get-Item -Path $localSesioDir).Attributes = 'Hidden' } # Get the user's home directory and global .sesio path $userHome = [Environment]::GetFolderPath('UserProfile') $globalSesioPath = Join-Path $userHome ".sesio\template.aarc" $destinationFile = "$localSesioDir\default.aarc" # Copy from global .sesio to local .sesio if (Test-Path -Path $globalSesioPath) { Copy-Item -Path $globalSesioPath -Destination $destinationFile -Force } else { Write-Error "Global template file not found at: $globalSesioPath" } } Export-ModuleMember -Function Sesio-Init |