Search notes:
PowerShell cmdLet Get-TypeData
PS> $sif = get-typeData System.IO.FileInfo
PS> $sif.members
Key Value
--- -----
Mode System.Management.Automation.Runspaces.CodePropertyData
VersionInfo System.Management.Automation.Runspaces.ScriptPropertyData
BaseName System.Management.Automation.Runspaces.ScriptPropertyData
Target System.Management.Automation.Runspaces.CodePropertyData
LinkType System.Management.Automation.Runspaces.CodePropertyData
PS> $sif.members['BaseName'].GetScriptBlock
if ($this.Extension.Length -gt 0){$this.Name.Remove($this.Name.Length - $this.Extension.Length)}else{$this.Name}
The extensions can also be inspected with the
psExtended
member:
$fi = [System.IO.FileInfo] 'P:/ath/to/a/file.txt'
$fi.psExtended