Share via


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.String

    The server relative URL of the file.

    It must not be null. It must not be empty.

Return value

Type: Microsoft.SharePoint.Client.File
Returns File.

See also

Reference

FileCollection class

FileCollection members

Microsoft.SharePoint.Client namespace