I'm quite confused as there seems to be multiple redundant ways to solve my problem (read a file, parse the content, serve it via http). Most people on stackoverflow would use bufio, but I just can't get the differences between this package and the Buffer type of bytes and just reading a file with the os methods. Also I don't know when and why I should choose those ways to do it, when I have the simple, but non-versatile, ioutils.ReadFile.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Requires -Version 7.3 | |
$global:UserInput = $null | |
$global:PrintPipelineProcess = "printfilterpipelinesvc" | |
$global:PrintPipelineExe = "C:\Windows\System32\printfilterpipelinesvc.exe" | |
$global:SpoolerService = "spooler" | |
$global:SpoolDirectory = "C:\Windows\System32\spool\PRINTERS" | |
$global:CurrentPrincipal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent()) | |
function GetItemsInQueue() { |