How to access a PSDrive from System.IO.File calls?
问题 I'm writing a c# cmdlet which copies files from one location to another (similar to rsync). It even supports ToSession and FromSession. I'd like it to work with PSDrives that use the Filesystem provider but it currently throws an error from System.IO.File.GetAttributes("psdrive:\path") I'd really like to use calls from System.IO on the PSDrive. How does something like copy-item do this? I've performed a search for accessing PSDrives from c# and have returned no results. This is the equivalent