Represents a file in a SharePoint Web site that can be a Web Part Page, an item in a document library, or a file in a folder.
Methods
public approve(comment: string)
Approves the file submitted for content approval with the specified comment.
Parameters
public checkIn(comment: string, checkInType: CheckinType)
Parameters
public checkOut()
public copyTo(strNewUrl: string, bOverWrite: boolean)
Parameters
-
strNewUrl: string
-
bOverWrite: boolean
public customFromJson(initValue: any): boolean
Parameters
Returns
boolean
public deleteObject()
public deny(comment: string)
Denies the file submitted for content approval.
Parameters
public fromJson(initValue: any)
Parameters
public get_author(): User
Returns
User
public get_checkInComment(): string
Returns the comment that was specified when the document was checked into the document library.
Returns
string
public get_checkOutType(): CheckOutType
The type of checkout that exists on the document.
Returns
CheckOutType
public get_checkedOutByUser(): User
Returns the user who has checked out the file.
Returns
User
public get_contentTag(): string
Returns
string
Gets the customization(ghost) status of the SPFile.
Returns
CustomizedPageStatus
public get_eTag(): string
Gets the ETag of the file
Returns
string
public get_exists(): boolean
Specifies whether the file exists
Returns
boolean
public get_length(): number
Returns
number
public get_listItemAllFields(): ListItem
Specifies the SPListItem corresponding to this file if this file belongs to a doclib. Values for all fields are returned also.
Returns
ListItem
public get_lockedByUser(): User
Returns the user that owns the current lock on the file. MUST return null if there is no lock.
Returns
User
public get_majorVersion(): number
Specifies the major version of the file.
Returns
number
public get_minorVersion(): number
Specifies the minor version of the file.
Returns
number
public get_modifiedBy(): User
Returns
User
public get_name(): string
Returns
string
public get_objectVersion(): string
Returns
string
public get_serverObjectIsNull(): boolean
Returns
boolean
public get_serverRelativeUrl(): string
Returns
string
public get_timeCreated(): Date
Specifies when the file was created.
Returns
Date
public get_timeLastModified(): Date
Specifies when the file was created.
Returns
Date
public get_title(): string
Returns
string
public get_uIVersion(): number
Specifies the implementation-specific version identifier of the file.
Returns
number
public get_uIVersionLabel(): string
Specifies the implementation-specific version identifier of the file.
Returns
string
Returns a collection of file version objects that represent the versions of the file.
Returns
FileVersionCollection
public isObjectPropertyInstantiated(propertyName: string): boolean
Parameters
Returns
boolean
public isPropertyAvailable(propertyName: string): boolean
Parameters
Returns
boolean
public moveTo(newUrl: string, flags: MoveOperations)
Parameters
public publish(comment: string)
Parameters
Moves the file to the recycle bin. MUST return the identifier of the new Recycle Bin item
Returns
GuidResult
public retrieve()
public retrieve(propertyNames: Array<string>)
Parameters
-
propertyNames: Array<string>
Parameters
public set_objectVersion(value: string)
Parameters
public unPublish(comment: string)
Removes the file from content approval with the specified comment.
Parameters
public undoCheckOut()
Reverts an existing online or offline checkout for the file.