Export (0) Print
Expand All

EcmDocumentRouter.SaveFileToFinalLocation method

Save file content and properties to a location specified by targetFolder parameter.

Namespace:  Microsoft.Office.RecordsManagement.RecordsRepository
Assembly:  Microsoft.Office.Policy (in Microsoft.Office.Policy.dll)

public static SPFile SaveFileToFinalLocation(
	EcmDocumentRoutingWeb edrWeb,
	SPFolder targetFolder,
	Stream fileStream,
	string fileName,
	string originalFilePath,
	Hashtable fileProperties,
	SPUser fileAuthor,
	bool overrideVersioning,
	string checkInComment
)

Parameters

edrWeb
Type: Microsoft.Office.RecordsManagement.RecordsRepository.EcmDocumentRoutingWeb

The Document Routing Web where the file is to be saved.

targetFolder
Type: Microsoft.SharePoint.SPFolder

The SPFolder to which the file is to be saved. If saving directly to a list, provide the RootFolder property value.

fileStream
Type: System.IO.Stream

Content of the file in a stream.

fileName
Type: System.String

Name of the file to be saved.

originalFilePath
Type: System.String

URL or path of the file from which the content and properties of the new file were taken.

fileProperties
Type: System.Collections.Hashtable

Properties of the file. If a field of the same name as a key in the hashtable exists on the content type of the new file, the field will be populated with the value in the hashtable.

fileAuthor
Type: Microsoft.SharePoint.SPUser

User who created this file.

overrideVersioning
Type: System.Boolean

Always create a new file regardless of the router name conflict settings.

checkInComment
Type: System.String

A comment about the check in.

Return value

Type: Microsoft.SharePoint.SPFile
Returns SPFile.
Show:
© 2015 Microsoft