共用方式為


SPFile members

Include protected members
Include inherited members

表示可以是Web Parts pageSharePoint 網站中的檔案、 文件庫中的項目或資料夾中的檔案。

The SPFile type exposes the following members.

Properties

  Name Description
Public property Author 取得文件上載至伺服器或伺服器上建立文件的使用者。
Public property BackwardLinks 取得表示向後的連結檔案的連結物件的集合。
Public property CharSetName 取得檔案中使用的字元集的名稱。
Public property CheckedOutBy Obsolete. 這個屬性已過時。請改用LockedByUser
Public property CheckedOutByUser 取得物件,表示已經簽出檔案的使用者。
Public property CheckedOutDate 取得檔案已簽出的時間與日期。
Public property CheckInComment 取得時,會使用檢查文件到文件庫的註解。
Public property CheckOutExpires Obsolete. 這個屬性已過時。請改用LockExpires
Public property CheckOutStatus Obsolete. 這個屬性已過時。請改用CheckOutType
Public property CheckOutType 取得值,指出從文件庫簽出檔案的方式。
Public property CustomizedPageStatus 取得檔案物件的自訂 (也稱為 「 無反應 」) 狀態。
Public property DocumentLibrary 取得SPFile的父代程式庫。
Public property EffectiveAuditMask 取得這個物件的有效的稽核遮罩。
Public property EffectiveRawPermissions 取得目前使用者的有效基底權限。
Public property ETag 取得 ETag 可識別的檔案版本。
Public property EventReceivers 取得檔案的事件接收器定義集合。
Public property Exists 取得布林值,這個值,指出檔案是否存在。
Public property ForwardLinks 取得表示檔案中的正向連結的連結物件的集合。
Public property GeneratingConverterId Obsolete. 取得用來建立檔案或Guid.Empty ,如果檔案不是子檔案轉換程式的 ID。
Public property Generator 取得建立.htm 或.aspx 檔案的應用程式名稱。
Public property IconUrl 取得要與檔案相關聯的圖示的 URL。
Public property InDocumentLibrary 取得布林值,這個值,指出檔案是否屬於文件庫。
Public property IsConvertedFile Obsolete. 取得布林值,這個值,指出是否為文件轉換的一部份建立檔案物件。
Public property IsIRMed 取得布林值,這個值,指出檔案是否已啟用 「 資訊授權管理。
Public property IsSharedAccessRequested 取得布林值,這個值,指出是否已要求檔案共用的存取權。
Public property Item 取得對應到檔案,如果檔案所屬的文件庫的清單項目物件。
Public property Length 取得檔案的大小 (單位為位元組),不包括檔案中使用的任何網頁組件大小。
Public property LengthByUser 取得包含Web Parts page,包括使用者名稱、 使用者 ID 和網頁組件個人化項目使用的位元組數目的每個使用者的相關資訊的使用者儲存物件的集合。
Public property Level 取得檔案的發行集的層級。
Public property ListItemAllFields 取得對應到這個檔案,包括其所有欄位的值,如果檔案所屬的文件庫的SPListItem物件。
Public property LockedByUser 取得已鎖定檔案的使用者。
Public property LockedDate 取得建立日期和時間的檔案鎖定。
Public property LockExpires 取得到期的日期和時間的檔案鎖定。
Public property LockId 取得檔案的目前鎖定的識別碼 (ID)。
Public property LockType 取得值,這個值描述位於檔案的鎖定類型。
Public property MajorVersion 取得檔案的主要版本。
Public property MinorVersion 取得檔案的次要版本。
Public property ModifiedBy 取得使用者物件,表示上次修改檔案的使用者。
Public property Name 取得包含副檔名的檔案名稱。
Public property ParentFolder 取得檔案的上層資料夾。
Public property ProgID 取得字串,可識別的檔案所建立的應用程式。
Public property Properties 取得檔案的中繼資料。
Public property RequiresCheckout 取得指定檔案是否需要簽出的文件媒體櫃中的Boolean值。
Public property ServerRedirected 取得布林值,這個值,指出是否使用者沒有存取以檢視來源檔案,或沒有適當的用戶端應用程式安裝,重新導向至檔案的伺服器端呈現當他們按一下連結以檢視它。
Public property ServerRelativeUrl 取得以伺服器的 URL 為基礎的檔案相對 URL。
Public property SourceFile Obsolete. 取得透過文件轉換的父檔案物件所建立的檔案。
Public property SourceLeafName Obsolete. 取得檔案的父代文件分葉名稱。
Public property SourceUIVersion Obsolete. 取得檔案中的父代文件的版本號碼。
Public property TimeCreated 取得指出檔案建立時的日期和時間值。
Public property TimeLastModified 取得指出檔案上次修改的日期和時間值。
Public property Title 取得檔案的顯示名稱。
Public property TotalLength 取得以位元組為單位,包括大小的檔案中使用任何 Web 組件檔案的大小。
Public property UIVersion 取得檔案的版本號碼。
Public property UIVersionLabel 取得檔案的版本。
Public property UniqueId 取得可唯一識別 [內容資料庫中的檔案的 GUID。
Public property Url 取得檔案的站台相對 URL。
Public property Versions 取得代表檔案的版本的檔案版本物件的集合。
Public property Web 取得網站檔案所在的位置。

Top

Methods

  Name Description
Public method AddProperty 將項目加入至中繼資料檔案的清單。
Public method Approve 核准專為內容核准而送出並包含指定註解的檔案。
Public method CanOpenFile(Boolean) 表示目前使用者是否有檢視的檔案內容的權限指定的存取層級。
Public method CanOpenFile(Boolean, String) 表示目前使用者是否有檢視的檔案內容的權限指定存取層級以及用來接收 ETag 輸出變數。
Public method CheckIn(String) 檢查指定的註解的文件庫檔案中。
Public method CheckIn(String, SPCheckinType) 檢查文件庫,根據指定的註解和簽入的型別來執行檔案中。
Public method CheckOut() 檢查出文件庫的檔案。
Public method CheckOut(Boolean, String) 藉由指定是否將它簽出檔案至本機電腦,以及藉由指定的檔案應該不能簽出是否已經修改在特定日期後,以簽出文件庫中的檔案。
Public method CheckOut(SPFile.SPCheckOutType, String) 檢查出文件庫,藉由指定的型別簽出的並藉由指定的檔案不應該從檔案簽出是否在特定日期後將它修改。
Public method Convert Obsolete. 轉換使用指定的轉換程式的檔案。
Public method ConvertLock 將現存的鎖定檔案轉換成新的鎖定類型。
Public method CopyTo(String) 將檔案複製到目的 URL,但不會覆寫相同名稱的現有檔案。
Public method CopyTo(String, Boolean) 將檔案複製到目的 URL,並選擇性地覆寫相同名稱的現有檔案。
Public method CreateSharedAccessRequest 要求共用檔案的存取權。
Public method Delete 刪除檔案的物件。
Public method DeleteAllPersonalizations 從Web Parts page、 首頁] 頁面中或使用者帶有指定 ID 的 wiki 頁面會刪除所有的個人化資訊
Public method DeleteAllPersonalizationsAllUsers 從Web Parts page中刪除所有使用者的個人化資訊。
Public method DeleteCellStoragePartition 刪除指定的儲存格的儲存磁碟分割中的所有項目。
Public method DeleteProperty 從檔案的中繼資料的清單中刪除項目。
Public method Deny 拒絕對於內容核准送出的檔案核准。
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetConversionState Obsolete. 傳回的轉換狀態的檔案到指定的轉換程式識別碼。
Public method GetConvertedFile Obsolete. 傳回由這個檔案中使用文件轉換和指定的轉換程式所建立的子檔案。
Public method GetHashCode (Inherited from Object.)
Public method GetHtmlTranslateCacheItem 傳回的 HTML 轉譯,排除比上次修改檔案的日期還舊的快取項目快取檔案的內容。
Public method GetHtmlTranslateCacheNameFromStsName 從 HTML 轉譯的快取傳回主要檔案的名稱。
Public method GetLimitedWebPartManager 傳回與Web Parts page相關聯的網頁組件管理員。
Public method GetListItem 如果此檔案所屬的文件庫,請取得對應到這個檔案中, SPListItem 。也會取得指定欄位的值。
Public method GetProperty 根據指定的索引鍵的檔案,從清單中的項目中繼資料取得的值。
Public method GetType (Inherited from Object.)
Public method GetWebPartCollection Obsolete. 使用GetLimitedWebPartManager方法來傳回SPLimitedWebPartManager物件而是管理 Web 組件。(在Windows SharePoint Services 2.0的GetWebPartCollection方法傳回與 Web 組件網頁相關聯的網頁組件集合)。
Public method Lock 建立檔案,對其進行修改時,防止其他使用者鎖定。
Protected method MemberwiseClone (Inherited from Object.)
Public method MoveTo(String) 將檔案移至目的 URL,但不會覆寫相同名稱的現有檔案。
Public method MoveTo(String, SPMoveOperations) 將檔案移至指定的目的地 URL,根據指定的作業類型。
Public method MoveTo(String, Boolean) 將檔案移至目的 URL,並選擇性地覆寫相同名稱的現有檔案。
Public method MoveTo(String, SPMoveOperations, Boolean) 將檔案移至指定的目的地 URL。
Public method OpenBinary() 開啟檔案以二進位格式。
Public method OpenBinary(SPOpenBinaryOptions) 開啟指定的檔案,做為位元組陣列,並指定控制檔案的開啟方式的選項。
Public method OpenBinaryStream() 開啟的檔案當做資料流。
Public method OpenBinaryStream(SPOpenBinaryOptions) 開啟指定的檔案當做資料流,並指定控制檔案的開啟方式的選項。
Public method OpenBinaryStream(SPOpenBinaryOptions, String, String) 開啟的檔案當做資料流,根據指定的選項。
Public method OpenBinaryStream(SPOpenBinaryOptions, String, SPFileRightsManagementSettings, String, String) 開啟的檔案當做資料流。
Public method OpenFileFormatMetaInfoStream 從資料庫取得此檔案的檔案格式的中繼資訊。
Public method Publish 送出檔案進行內容核准,並加入指定的註解。
Public method Recycle 將檔案傳送到 [資源回收筒]。
Public method RefreshLock 更新現存的鎖定檔案。
Public method ReleaseLock 釋放由其識別項 (ID) 所指定的現有鎖定。
Public method RemoveSharedAccessRequest 從共用的存取要求中移除這個檔案。
Public method ReplaceLink 新的連結來取代所有執行個體在檔案中指定的連結。
Public method RevertContentStream 狀態,因此快取的記憶體中 (或 「 建立映像 」),就會成為其邏輯,而不是儲存在資料庫中,則您可以回到其原始檔。
Public method SaveBinary([]) 根據指定的位元組陣列的二進位格式儲存的檔案。
Public method SaveBinary(Stream) 根據指定的資料流的二進位格式儲存的檔案。
Public method SaveBinary([], Boolean) 根據指定的位元組陣列和布林值,指定是否要檢查必要的欄位的二進位格式儲存的檔案。
Public method SaveBinary(Stream, SPFileSaveBinaryParameters) 根據包含的檔案和其他參數的SPFileSaveBinaryParameters物件的資料流的二進位格式儲存的檔案。
Public method SaveBinary(Stream, Boolean) 根據指定的資料流和布林值,指定是否要檢查必要的欄位的二進位格式儲存的檔案。
Public method SaveBinary(Stream, Boolean, Boolean, String, String, Stream, String) 將儲存的檔案和檔案格式的中繼資料根據指定的資料流、 字串和選擇性的ETag值。
Public method SaveBinary(Stream, Boolean, Boolean, String, String, Stream, Boolean, String) 將儲存的檔案和檔案格式的中繼資料根據指定的資料流、 字串、 布林值,以及選擇性的ETag值。
Public method SaveFileFormatMetaInfoStream 儲存中繼資料,其中包含指定的檔案到資料庫的檔案格式資訊的資料流。
Public method ScheduleEnd 設定將從公用檢視的文件庫移除所在檔案的日期。
Public method ScheduleStart(DateTime) 排程的自動核准的控管型的程式庫中的文件在指定的日期和時間。
Public method ScheduleStart(DateTime, Boolean) 排程在指定的日期和時間,需仲裁的媒體櫃中的文件的自動核准,並選擇性地離開適度的狀態不變項目。
Public method ScheduleStart(DateTime, String) 排程自動核准的仲裁程式庫中的文件,在指定的日期及時間核准指定的說明。
Public method ScheduleStart(DateTime, Boolean, String) 排程的自動核准的控管型的程式庫中的文件在指定的日期和時間,以指定的核准註解,並選擇性地適度狀態變更的清單項目。
Public method SendToOfficialFile(String) 將檔案傳送到記錄儲存機制。
Public method SendToOfficialFile(String, String) 將檔案傳送到記錄存放庫,並指定 [記錄路由型別名稱。
Public method SendToOfficialFile(String, SPOfficialFileHost, String, SPOfficialFileSubmissionMode, String) 將檔案傳送至特定的 URL。
Public method SendToOfficialFile(String, SPOfficialFileHost, [], String, SPOfficialFileSubmissionMode, String) 將檔案傳送至特定的 URL。
Public methodStatic member SendToOfficialFile(SPWeb, Uri, [], [], String, Uri, String, SPOfficialFileSubmissionMode, SPFile.CustomFileSubmissionPostProcessing, String) 將檔案傳送到目的地的路由器。
Public method SetHtmlTranslateCacheItem 將檔案的內容儲存到快取中的 HTML 轉譯。
Public method SetProperty 設定檔案的中繼資料的清單中的某個項目的值。
Public methodStatic member StorageManagementWebPartPageInformation Obsolete. 傳回Web Parts page的存放裝置管理的相關資訊。
Public method TakeOffline 離線使用檔案的最新核准或主要版本。
Public method ToString 傳回根據站台或子網站的 URL 的檔案的 URL。 (Overrides Object.ToString().)
Public method UndoCheckOut 復原取出檔案。
Public method UnPublish 從內容核准移除具有指定註解的檔案。
Public method Update 對檔案進行的變更來更新資料庫。

Top

請參閱

參照

SPFile class

Microsoft.SharePoint namespace