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)
Syntax
'Declaration
Public Shared Function SaveFileToFinalLocation ( _
edrWeb As EcmDocumentRoutingWeb, _
targetFolder As SPFolder, _
fileStream As Stream, _
fileName As String, _
originalFilePath As String, _
fileProperties As Hashtable, _
fileAuthor As SPUser, _
overrideVersioning As Boolean, _
checkInComment As String _
) As SPFile
'Usage
Dim edrWeb As EcmDocumentRoutingWeb
Dim targetFolder As SPFolder
Dim fileStream As Stream
Dim fileName As String
Dim originalFilePath As String
Dim fileProperties As Hashtable
Dim fileAuthor As SPUser
Dim overrideVersioning As Boolean
Dim checkInComment As String
Dim returnValue As SPFile
returnValue = EcmDocumentRouter.SaveFileToFinalLocation(edrWeb, _
targetFolder, fileStream, fileName, _
originalFilePath, fileProperties, _
fileAuthor, overrideVersioning, _
checkInComment)
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.EcmDocumentRoutingWebThe Document Routing Web where the file is to be saved.
targetFolder
Type: Microsoft.SharePoint.SPFolderThe SPFolder to which the file is to be saved. If saving directly to a list, provide the RootFolder property value.
fileStream
Type: System.IO.StreamContent of the file in a stream.
fileName
Type: System.StringName of the file to be saved.
originalFilePath
Type: System.StringURL or path of the file from which the content and properties of the new file were taken.
fileProperties
Type: System.Collections.HashtableProperties 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.SPUserUser who created this file.
overrideVersioning
Type: System.BooleanAlways create a new file regardless of the router name conflict settings.
checkInComment
Type: System.StringA comment about the check in.
Return Value
Type: Microsoft.SharePoint.SPFile
Returns SPFile.
See Also
Reference
Microsoft.Office.RecordsManagement.RecordsRepository Namespace