RollingFileAppender DeleteFile Method | Apache log4net™ SDK Documentation

Deletes the specified file if it exists.

Namespace: log4net.Appender
Assembly: log4net (in log4net.dll) Version: 2.0.8.0-.NET 4.0
Syntax

C#
VB
C++
F#
Copy

    protected void DeleteFile(
    	string fileName
    )

    Protected Sub DeleteFile (
    	fileName As String
    )

    protected:
    void DeleteFile(
    	String^ fileName
    )

    member DeleteFile :
            fileName : string -> unit

#### Parameters

fileName
  Type: System
  String
  The file to delete.

Remarks

Delete a file if is exists. The file is first moved to a new filename then deleted. This allows the file to be removed even when it cannot be deleted, but it still can be moved.

See Also

#### Reference

RollingFileAppender Class
log4net.Appender Namespace