FileCollection.AddTemplateFile method
Adds a ghosted file to an existing list or document library.
Namespace: Microsoft.SharePoint.Client
Assembly: Microsoft.SharePoint.Client (in Microsoft.SharePoint.Client.dll)
Syntax
'Declaration
Public Function AddTemplateFile ( _
urlOfFile As String, _
templateFileType As TemplateFileType _
) As File
'Usage
Dim instance As FileCollection
Dim urlOfFile As String
Dim templateFileType As TemplateFileType
Dim returnValue As File
returnValue = instance.AddTemplateFile(urlOfFile, _
templateFileType)
public File AddTemplateFile(
string urlOfFile,
TemplateFileType templateFileType
)
Parameters
urlOfFile
Type: System.StringThe server relative URL of the file.
It must not be null. It must not be empty.
templateFileType
Type: Microsoft.SharePoint.Client.TemplateFileTypeSpecifies the template file type used for file creation.
The templateFileType must be of Standard or Wiki or Form type.
Return value
Type: Microsoft.SharePoint.Client.File
Returns File.