PscxInputObjectPathCommandBase question

Topics: Developer Forum
Jan 3, 2007 at 5:19 AM
Quick question: given the two distinct parameter sets handled by this class -- path and inputobject -- why does a piped object trigger both ProcessPath AND ProcessInputObject, yet a path only triggers ProcessPath? I would have thought that a piped object should not trigger process path?

- Oisin
Jan 3, 2007 at 5:23 AM
ok, never mind -- overriding InputSettings and setting settings.ProcessFileInfoAsPath = false; does the trick.

I'm getting there lads, have patience with me. ;)
Jan 3, 2007 at 5:56 AM
No problem. The base classes Jachym has put in place are pretty nice where you can use them and they are fairly flexible. You really realize this when you can write a parameter and pipeline aware cmdlet like Get-FileVersionInfo in so few lines of code. In many of my file oriented cmdlets I always set the ProcessDirectoryInfoAsPath property to false and then I register to ignore these objects.