SP.FileCollection.addTemplateFile(urlOfFile, templateFileType) Method

Adds a ghosted file to an existing list or document library.

Applies to: SharePoint Foundation 2010

var value = SP.FileCollection.addTemplateFile(urlOfFile, templateFileType);

Parameters

  • urlOfFile
    The server relative URL of the file. It must not be null. It must not be empty.

Type: String

  • templateFileType
    Specifies the template file type used for file creation. The templateFileType must be of Standard or Wiki or Form type.

Type: SP.TemplateFileType

Return Value

Type: SP.File

Applies To

SP.FileCollection Class

See Also

Reference

SP.FileCollection Methods

SP.FileCollection Properties

SP Namespace