File Members
Include Protected Members
Include Inherited Members
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.
The File type exposes the following members.
Constructors
Name | Description | |
---|---|---|
File |
Top
Properties
Name | Description | |
---|---|---|
Author | Gets a value that specifies the user who added the file. | |
CheckedOutByUser | Gets a value that returns the user who has checked out the file. | |
CheckInComment | Gets a value that returns the comment used when a document is checked into a document library. | |
CheckOutType | Gets a value that specifies the type of check out associated with the file. | |
Context | Returns the context that is associated with the client object. (Inherited from ClientObject.) | |
CustomizedPageStatus | Gets a value that specifies the customization status of the file. | |
ETag | Gets a value that specifies the ETag value. | |
Exists | Gets a value that specifies whether the file exists. | |
Level | Gets a value that specifies the publishing level of the file. | |
ListItemAllFields | Gets a value that specifies the list item field values for the list item corresponding to the file. | |
LockedByUser | Gets a value that returns the user that owns the current lock on the file. | |
MajorVersion | Gets a value that specifies the major version of the file. | |
MinorVersion | Gets a value that specifies the minor version of the file. | |
ModifiedBy | Gets a value that returns the user who last modified the file. | |
Name | Gets the name of the file including the extension. | |
ObjectData | Gets the object data for the current client object. (Inherited from ClientObject.) | |
ObjectVersion | Gets a string that indicates the version of the current client object. This member is reserved for internal use and is not intended to be used directly from your code. (Inherited from ClientObject.) | |
Path | Tracks how a client object is created in the ClientRuntimeContext class, so that the object can be re-created on the server. This member is reserved for internal use and is not intended to be used directly from your code. (Inherited from ClientObject.) | |
ServerObjectIsNull | Gets the server object and returns null if the server object is null. (Inherited from ClientObject.) | |
ServerRelativeUrl | Gets the relative URL of the file based on the URL for the server. | |
Tag | Gets or sets data that is associated with the client object. (Inherited from ClientObject.) | |
TimeCreated | Gets a value that specifies when the file was created. | |
TimeLastModified | Gets a value that specifies when the file was last modified. | |
Title | Gets a value that specifies the display name of the file. | |
UIVersion | Gets a value that specifies the implementation-specific version identifier of the file. | |
UIVersionLabel | Gets a value that specifies the implementation-specific version identifier of the file. | |
Versions | Gets a value that returns a collection of file version objects that represent the versions of the file. |
Top
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. | |
CheckUninitializedProperty | Checks to determine whether the specified value type property of a ClientObject has been initialized. (Inherited from ClientObject.) | |
CopyTo | Copies the file to the destination URL. Server must overwrite an existing file of the same name if bOverwrite is true. | |
CustomFromJson | Returns a Boolean value that indicates whether custom code was used to populate an object. This member is reserved for internal use and is not intended to be used directly from your code. (Inherited from ClientObject.) | |
DeleteObject | Deletes the file object. | |
FromJson | Indicates whether custom code was used to populate an object. This member is reserved for internal use and is not intended to be used directly from your code. (Inherited from ClientObject.) | |
GetLimitedWebPartManager | Specifies the control set used to access, modify, or add Web Parts associated with this Web Part Page and view. | |
InitNonPropertyFieldFromJson | Initializes a non-property field of the client object based on JSON data from the server. This member is reserved for internal use and is not intended to be used directly from your code. (Inherited from ClientObject.) | |
InitOnePropertyFromJson | (Overrides ClientObject.InitOnePropertyFromJson(String, JsonReader).) | |
IsObjectPropertyInstantiated | Indicates whether the specified property of the client object is instantiated. (Inherited from ClientObject.) | |
IsPropertyAvailable | Returns a Boolean value that indicates whether the specified scalar property has been retrieved or set. (Inherited from ClientObject.) | |
LoadExpandoFields | When overridden in a derived class, initializes the extended properties associated with the client object. (Inherited from ClientObject.) | |
MoveTo | Moves the file to the specified destination URL. | |
OpenBinaryDirect(ClientContext, String) | Downloads the specified file from a SharePoint site without requiring an ExecuteQuery() method call. | |
OpenBinaryDirect(ClientContext, String, EventHandler<OpenBinarySucceededEventArgs>, EventHandler<OpenBinaryFailedEventArgs>) | ||
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. | |
RefreshLoad | Reloads all scalar properties associated with the client object when overridden in a derived class. (Inherited from ClientObject.) | |
RemoveFromParentCollection | Removes the current client object from the parent client object collection. (Inherited from ClientObject.) | |
Retrieve() | Retrieves all scalar properties associated with the object. This member is reserved for internal use and is not intended to be used directly from your code. (Inherited from ClientObject.) | |
Retrieve([]) | Retrieves the specified scalar properties associated with the object. This member is reserved for internal use and is not intended to be used directly from your code. (Inherited from ClientObject.) | |
SaveBinary | Saves the specified file into a document library. | |
SaveBinaryDirect(ClientContext, String, Stream, Boolean) | Uploads the specified file to a SharePoint site without requiring an ExecuteQuery() method call. | |
SaveBinaryDirect(ClientContext, String, Stream, String) | Uploads the specified file to a SharePoint site with the specified Etag without requiring an ExecuteQuery() method call. | |
ToString | (Inherited from Object.) | |
UndoCheckOut | Reverts an existing checkout for the file. | |
UnPublish | Removes the file from content approval or unpublish a major version. |
Top