Adds a file to the specified folder.

Namespace: DotNetNuke.Services.FileSystem
Assembly: DotNetNuke (in DotNetNuke.dll)

Syntax

C#
public virtual IFileInfo AddFile(
	IFolderInfo folder,
	string fileName,
	Stream fileContent,
	bool overwrite
)
Visual Basic
Public Overridable Function AddFile ( 
	folder As IFolderInfo,
	fileName As String,
	fileContent As Stream,
	overwrite As Boolean
) As IFileInfo

Parameters

folder
Type: DotNetNuke.Services.FileSystem..::..IFolderInfo
The folder where to add the file.
fileName
Type: System..::..String
The name of the file.
fileContent
Type: System.IO..::..Stream
The content of the file.
overwrite
Type: System..::..Boolean
Indicates if the file has to be over-written if it exits.

Return Value

A IFileInfo as specified by the parameters.

Implements

IFileManager..::..AddFile(IFolderInfo, String, Stream, Boolean)

See Also