IStorageItem2 インターフェイス

定義

ストレージ項目 (ファイルとフォルダー) とその内容を操作し、それらに関する情報を提供します。

重要

アプリ内のファイルとフォルダーを操作するだけの場合は、 StorageFile クラスと StorageFolder クラスを参照してください。

public interface class IStorageItem2 : IStorageItem
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.Guid(1408837330, 2108, 17027, 180, 91, 129, 192, 7, 35, 126, 68)]
struct IStorageItem2 : IStorageItem
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.Guid(1408837330, 2108, 17027, 180, 91, 129, 192, 7, 35, 126, 68)]
public interface IStorageItem2 : IStorageItem
Public Interface IStorageItem2
Implements IStorageItem
派生
属性
実装

Windows の要件

デバイス ファミリ
Windows 10 (10.0.10240.0 で導入)
API contract
Windows.Foundation.UniversalApiContract (v1.0 で導入)

プロパティ

Attributes

ストレージ 項目の属性を取得します。

(継承元 IStorageItem)
DateCreated

現在のアイテムが作成された日時を取得します。

(継承元 IStorageItem)
Name

ファイル名拡張子がある場合は、ファイル名拡張子を含む項目の名前を取得します。

(継承元 IStorageItem)
Path

項目にパスがある場合は、アイテムの完全なファイル システム パスを取得します。

(継承元 IStorageItem)

メソッド

DeleteAsync()

現在のアイテムを削除します。

(継承元 IStorageItem)
DeleteAsync(StorageDeleteOption)

現在のアイテムを削除し、必要に応じて完全に削除します。

(継承元 IStorageItem)
GetBasicPropertiesAsync()

現在のアイテムの基本プロパティ (ファイルやフォルダーなど) を取得します。

(継承元 IStorageItem)
GetParentAsync()

現在のストレージ アイテムの親フォルダーを取得します。

IsEqual(IStorageItem)

現在の項目が指定した項目と同じかどうかを示します。

IsOfType(StorageItemTypes)

現在の IStorageItem が 、指定した StorageItemTypes 値と一致するかどうかを判断します。

(継承元 IStorageItem)
RenameAsync(String)

現在のアイテムの名前を変更します。

(継承元 IStorageItem)
RenameAsync(String, NameCollisionOption)

現在のアイテムの名前を変更します。 このメソッドは、現在のアイテムの場所にある既存のアイテムの名前が同じ場合の処理も指定します。

(継承元 IStorageItem)

適用対象

こちらもご覧ください