SP.File Methods

Applies to: SharePoint Foundation 2010

The following table lists the methods of the SP.File class.

Methods

Name

Description

checkIn

Checks the file in to a document library based on the check-in type.

checkOut

Checks out the file from a document library based on the check out type.

copyTo

Copies the file to the destination URL. Server must overwrite an existing file of the same name if bOverwrite is true.

deleteObject

Deletes the file object.

File

Initializes a new instance of the SP.File Class.

getLimitedWebPartManager

Specifies the control set used to access, modify, or add Web Parts associated with this Web Part Page and view.

initPropertiesFromJson

This member is reserved for internal use and is not intended to be used directly from your code.

moveTo

Moves the file to the specified destination URL.

publish

Submits the file for content approval with the specified comment.

recycle

Moves the file to the Recycle Bin and returns the identifier of the new Recycle Bin item.

undoCheckOut

Reverts an existing checkout for the file.

unPublish

Removes the file from content approval or unpublish a major version.

Applies To

SP.File Class

See Also

Reference

SP.File Properties

SP Namespace