ReportingService2006.CreateResource 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
將新的資源加入至 SharePoint 文件庫。
public:
ReportService2006::CatalogItem ^ CreateResource(System::String ^ Resource, System::String ^ Parent, bool Overwrite, cli::array <System::Byte> ^ Contents, System::String ^ MimeType, cli::array <ReportService2006::Property ^> ^ Properties);
public ReportService2006.CatalogItem CreateResource (string Resource, string Parent, bool Overwrite, byte[] Contents, string MimeType, ReportService2006.Property[] Properties);
member this.CreateResource : string * string * bool * byte[] * string * ReportService2006.Property[] -> ReportService2006.CatalogItem
Public Function CreateResource (Resource As String, Parent As String, Overwrite As Boolean, Contents As Byte(), MimeType As String, Properties As Property()) As CatalogItem
參數
- Resource
- String
新資源的名稱。
- Parent
- String
將包含資源之父資料夾的完整 URL。
- Overwrite
- Boolean
Boolean 運算式,指定是否要覆寫具有相同名稱和路徑的現有資源。 預設值為 false。
- Contents
- Byte[]
資源檔的內容。
- MimeType
- String
資源的 MIME 類型。 最大大小是 260 個字元。
傳回
新建立之資源的 CatalogItem 物件。
備註
下表顯示標頭以及有關這項作業的權限資訊。
| SOAP 標頭 | (In) TrustedUserHeaderValue (Out) ServerInfoHeaderValue |
| 必要權限 | 建立新資源: AddListItems 開啟 Parent更新現有資源: EditListItems 開啟 Resource |
參數的長度 Parent 不能超過260個字元; 否則會擲回 SOAP 例外狀況,並傳回錯誤碼 rsItemLengthExceeded。
Parent參數不可為 null 或空白,或包含下列保留字元: : ? ; @ & = + $ , \ * > < | . " 。 您可以使用正斜線字元 (/) 將資料夾的完整路徑名稱中的專案分開,但不能在資料夾名稱的結尾使用它。
如果發生錯誤,則不會建立資源。
將資源新增至 SharePoint 文件庫會修改 ModifiedBy ModifiedDate 上層資料夾的和屬性。