Skip to content

ac373a67 c09d c884 5587 1c635b3d80c3

Axel Kesseler edited this page Mar 1, 2023 · 14 revisions

PersistentLoggerFacade.Empty Method

Empties content of provided file.

Namespace: Plexdata.LogWriter.Facades
Assembly: Plexdata.LogWriter.Persistent (in Plexdata.LogWriter.Persistent.dll) Version: 1.0.7.1

Syntax

C#

public bool Empty(
	string filename
)

Parameters

 

filename
Type: System.String
The name of the file to empty.

Return Value

Type: Boolean
True is returned if file content was discarded successfully and false if not.

Implements

IPersistentLoggerFacade.Empty(String)

Exceptions

 

Exception Condition
ArgumentOutOfRangeException This exception is thrown if provided parameter filename is null, empty or consists only of whitespaces.
Exception Other exceptions, such as DirectoryNotFoundException, PathTooLongException, SecurityException, UnauthorizedAccessException, and more, may occur as well. See WriteAllText(String, String) for more information.

Remarks

This method tries to dispose the content of associated file.

See Also

Reference

PersistentLoggerFacade Class
Plexdata.LogWriter.Facades Namespace
IPersistentLoggerFacade.Empty(String)

Clone this wiki locally