Read-MemoryMappedFileContent¶
SYNOPSIS¶
Reads the content of an existing memory-mapped file.
SYNTAX¶
__AllParameterSets¶
Read-MemoryMappedFileContent [-Name] <string> [<CommonParameters>]
ALIASES¶
This cmdlet has the following aliases, {{Insert list of aliases}}
DESCRIPTION¶
This function opens a memory-mapped file by name and reads its entire content as a UTF-8 encoded string. If the file does not exist or cannot be accessed, the function returns null. Leading and trailing null characters are trimmed from the result.
EXAMPLES¶
EXAMPLE 1¶
Read-MemoryMappedFileContent -Name 'SharedBuffer'
Output:
Hello from shared memory!
Reads the contents of the memory-mapped file named 'SharedBuffer' and outputs the decoded string.
PARAMETERS¶
-Name¶
The unique name for the memory-mapped file.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 0
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
CommonParameters¶
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS¶
OUTPUTS¶
string¶
{{ Fill in the Description }}
System.String¶
{{ Fill in the Description }}
NOTES¶
The UTF-8 decoded string content of the memory-mapped file. Returns null if the file is inaccessible.