Add a new version of the file

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

Syntax

C#
string AddFileVersion(
	IFileInfo file,
	int userId,
	bool published = true,
	bool removeOldestVersions = true,
	Stream content = null
)
Visual Basic
Function AddFileVersion ( 
	file As IFileInfo,
	userId As Integer,
	Optional published As Boolean = true,
	Optional removeOldestVersions As Boolean = true,
	Optional content As Stream = Nothing
) As String

Parameters

file
Type: DotNetNuke.Services.FileSystem..::..IFileInfo
The file to add a version to
userId
Type: System..::..Int32
The user who is performing the operation
published
Type: System..::..Boolean
Indicates if the new version should be the published version
removeOldestVersions
Type: System..::..Boolean
Remove the oldest versions if # > MaxVersions
content
Type: System.IO..::..Stream
Version content

Return Value

The name of the file where the content should be stored

See Also