ContentCmdletProviderIntrinsics.Clear Method

Definition

Overloads

Clear(String)

Clears the content from the item(s) specified by the path.

Clear(String[], Boolean, Boolean)

Clears the content from the item(s) specified by the path.

Clear(String)

Clears the content from the item(s) specified by the path.

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

Parameters

path
String

The path to the item(s) to clear the content from.

Exceptions

If path is null.

If the path refers to a provider that could not be found.

If the path refers to a drive that could not be found.

If path does not contain glob characters and could not be found.

If the provider that the path refers to does not support this operation.

If the provider threw an exception.

Applies to

Clear(String[], Boolean, Boolean)

Clears the content from the item(s) specified by the path.

public:
 void Clear(cli::array <System::String ^> ^ path, bool force, bool literalPath);
public:
 void Clear(Platform::Array <Platform::String ^> ^ path, bool force, bool literalPath);
void Clear(std::Array <std::wstring const &> const & path, bool force, bool literalPath);
public void Clear (string[] path, bool force, bool literalPath);
member this.Clear : string[] * bool * bool -> unit
Public Sub Clear (path As String(), force As Boolean, literalPath As Boolean)

Parameters

path
String[]

The path(s) to the item(s) to clear the content from.

force
Boolean

Passed on to providers to force operations.

literalPath
Boolean

If true, globbing is not done on paths.

Exceptions

If path is null.

If the path refers to a provider that could not be found.

If the path refers to a drive that could not be found.

If path does not contain glob characters and could not be found.

If the provider that the path refers to does not support this operation.

If the provider threw an exception.

Applies to