Export (0) Print
Expand All

SPFile Methods

Windows SharePoint Services 3

The SPFile type exposes the following members.

  NameDescription
Public method Approve Approves the file submitted for content approval with the specified comment.
Public method CheckIn(String) Checks in the file to a document library with the specified comment.
Public method CheckIn(String, SPCheckinType) Checks in the file to a document library based on the specified comment and type of check in to perform.
Public method CheckOut() Checks the file out of a document library.
Public method CheckOut(Boolean, String) Checks out the file from a document library based on a Boolean value that indicates whether to check the file out to the local computer, and that indicates the last date that the file was modified.
Public method Convert Transforms the file using the specified transformer.
Public method CopyTo(String) Copies the file to the destination URL but does not overwrite an existing file of the same name.
Public method CopyTo(String, Boolean) Copies the file to the destination URL but overwrites an existing file of the same name only if bOverwrite is true.
Public method Delete Deletes the file object.
Public method DeleteAllPersonalizations Deletes all personalization information from the Web Part Page, home page, or wiki page for the user with the specified ID.
Public method DeleteAllPersonalizationsAllUsers Deletes personalization information for all users from the Web Part Page.
Public method Deny Rejects a file that was submitted for content approval.
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetConversionState Returns the transform state of the file with respect to the specified transformer ID.
Public method GetConvertedFile Returns the child file that was created from this file using document transforms and the specified transformer.
Public method GetHashCode (Inherited from Object.)
Public method GetHtmlTranslateCacheItem Returns the contents of the file from the cache for HTML translation, excluding cache items that are older than the date the file was last modified.
Public method GetHtmlTranslateCacheNameFromStsName Returns the name of the main file from the cache for HTML translation.
Public method GetLimitedWebPartManager Returns the Web Part manager that is associated with the Web Part Page.
Public method GetType (Inherited from Object.)
Public method GetWebPartCollection Obsolete. Use the GetLimitedWebPartManager method to return an SPLimitedWebPartManager object to manage Web Parts instead. (In Windows SharePoint Services 2.0 the GetWebPartCollection method returned the Web Part collection that is associated with the Web Part Page.)
Protected method MemberwiseClone (Inherited from Object.)
Public method MoveTo(String) Moves the file to the destination URL but does not overwrite an existing file of the same name.
Public method MoveTo(String, SPMoveOperations) Moves the file to the specified destination URL based on the type of operation that is specified.
Public method MoveTo(String, Boolean) Moves the file to the destination URL but overwrites an existing file of the same name only if bOverwrite is true.
Public method OpenBinary() Opens the file in binary format.
Public method OpenBinary(SPOpenBinaryOptions) Opens the specified file as a byte array and specifies options that control how the file opens.
Public method OpenBinaryStream() Opens the file as a stream.
Public method OpenBinaryStream(SPOpenBinaryOptions) Opens the specified file as a stream and specifies options that control how the file opens.
Public method Publish Submits the file for content approval with the specified comment.
Public method Recycle Sends the file to the recycle bin.
Public method ReplaceLink Replaces all instances in the file of a specified link with a new link.
Public method RevertContentStream Returns the file to its original uncustomized state so that its logic becomes cached in memory (also known as "ghosted") rather than stored in the database.
Public method SaveBinary([]) Saves the file in binary format based on the specified byte array.
Public method SaveBinary(Stream) Saves the file in binary format based on the specified stream.
Public method SaveBinary([], Boolean) Saves the file in binary format based on the specified byte array and a Boolean value that specifies whether to check required fields.
Public method SaveBinary(Stream, Boolean) Saves the file in binary format based on the specified stream and a Boolean value that specifies whether to check required fields.
Public method ScheduleEnd Sets the date on which a file will be removed from public views of a document library.
Public method ScheduleStart(DateTime) Schedules automatic approval of a document in a moderated library.
Public method ScheduleStart(DateTime, Boolean) Schedules automatic approval of a document in a moderated library and, optionally, leaves the moderation status of the item unchanged.
Public method ScheduleStart(DateTime, String) Schedules automatic approval of a document in a moderated library and specifies text for the approval comment.
Public method ScheduleStart(DateTime, Boolean, String) Schedules automatic approval of a document in a moderated library, specifies the text of the approval comment, and optionally changes the list item’s moderation status.
Public method SendToOfficialFile(String) Sends the file to a records repository.
Public method SendToOfficialFile(String, String) Sends the file to a records repository and specifies the name of a record routing type.
Public method SetHtmlTranslateCacheItem Puts the contents of the file into the cache for HTML translation.
Public method Static member StorageManagementWebPartPageInformation Returns information about storage management for the Web Part Page.
Public method TakeOffline Takes the most current approved or major version of the file offline.
Public method ToString Returns the URL for the file based on the site or subsite URL. (Overrides Object.ToString().)
Public method UndoCheckOut Undoes the file check-out.
Public method UnPublish Removes the file with the specified comment from content approval.
Public method Update Updates the database with changes that are made to the file.
Top

Community Additions

ADD
Show:
© 2015 Microsoft