Example #1
0
        protected override void ProcessPath(PscxPathInfo pscxPath)
        {
            var name = ReparsePointHelper.EnsurePathSlash(pscxPath.ProviderPath);

            if (!NativeMethods.DeleteVolumeMountPoint(name))
            {
                ErrorHandler.WriteLastWin32Error("DeleteVolumeMountPointFailed", name);
            }

            base.ProcessPath(pscxPath);
        }
Example #2
0
        protected override void ProcessRecord()
        {
            var volume = Path.GetPathRoot(Volume);

            if (String.IsNullOrEmpty(volume))
            {
                EnumerateVolumes();
            }
            else
            {
                volume = ReparsePointHelper.EnsurePathSlash(volume);
                EnumerateVolumeMountPoints(volume);
            }
        }