Exemplo n.º 1
0
 protected override void ProcessRecord()
 {
     foreach (String _path in Path)
     {
         InvokeProvider.Item.Remove(_path, Recurse.ToBool());
     }
 }
Exemplo n.º 2
0
        protected override void ProcessRecord()
        {
            foreach (String _path in Path)
            {
                InvokeProvider.Item.Copy(_path, Destination, Recurse.ToBool(),
                                         (Container.ToBool()) ? CopyContainers.CopyTargetContainer : CopyContainers.CopyChildrenOfTargetContainer);

                if (PassThru.ToBool())
                {
                    WriteObject(Path);
                }
            }
        }
Exemplo n.º 3
0
        protected override void ProcessRecord()
        {
            if (Path == null)
            {
                Path = new String[] { String.Empty }
            }
            ;

            if (Include != null)
            {
                if (Exclude != null)
                {
                    foreach (String _path in Path)
                    {
                        IncludeExclude(
                            InvokeProvider.ChildItem.GetNames(_path, ReturnContainers.ReturnMatchingContainers, Recurse.ToBool()),
                            InvokeProvider.ChildItem.Get(_path, Recurse.ToBool()),
                            Include,
                            Exclude);
                    }
                    return;
                }
            }

            if (Name.ToBool())
            {
                foreach (String _path in Path)
                {
                    foreach (String _name in
                             InvokeProvider.ChildItem.GetNames(_path, ReturnContainers.ReturnMatchingContainers, Recurse.ToBool()))
                    {
                        WriteObject(_name);
                    }
                }
            }

            else
            {
                foreach (String _path in Path)
                {
                    foreach (PSObject _item in
                             InvokeProvider.ChildItem.Get(_path, Recurse.ToBool()))
                    {
                        WriteObject(_item);
                    }
                }
            }
        }
Exemplo n.º 4
0
 void ISetupCommandProxy <ApplicationFileAdapterFolderTeardownCommandProxy> .Setup(ApplicationFileAdapterFolderTeardownCommandProxy commandProxy)
 {
     Setup(commandProxy);
     commandProxy.Recurse = Recurse.IsPresent && Recurse.ToBool();
 }