Freigeben über


IContentCmdletProvider.ClearContent(String) Method

Definition

Clears the content from the specified item.

public:
 void ClearContent(System::String ^ path);
public:
 void ClearContent(Platform::String ^ path);
void ClearContent(std::wstring const & path);
public void ClearContent (string path);
abstract member ClearContent : string -> unit
Public Sub ClearContent (path As String)

Parameters

path
String

The path to the item to clear the content from.

Remarks

Overrides of this method should remove any content from the object but not remove (delete) the object itself.

Providers that declare ProviderCapabilities of ExpandWildcards, Filter, Include, or Exclude should ensure that the path passed meets those requirements by accessing the appropriate property from the base class.

By default overrides of this method should not clear or write objects that are generally hidden from the user unless the Force property is set to true. An error should be sent to the WriteError method if the path represents an item that is hidden from the user and Force is set to false.

Applies to