Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
MSDN Library
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IStorageItem interface

Manipulates storage items (files and folders) and their contents, and provides information about them.

Note  If you simply want to work with files and folders in your app, see the StorageFile and StorageFolder classes.

Syntax


Public Interface IStorageItem

Members

The IStorageItem interface has these types of members:

Methods

The IStorageItem interface has these methods. It also inherits methods from the Object class.

MethodDescription
DeleteAsync() Deletes the current item.
DeleteAsync(StorageDeleteOption) Deletes the current item, optionally deleting it permanently.
GetBasicPropertiesAsync Gets the basic properties of the current item (like a file or folder).
IsOfType Determines whether the current IStorageItem matches the specified StorageItemTypes value.
RenameAsync(String) Renames the current item.
RenameAsync(String, NameCollisionOption) Renames the current item. This method also specifies what to do if an existing item in the current item's location has the same name.

 

Properties

The IStorageItem interface has these properties.

PropertyAccess typeDescription

Attributes

Read-onlyGets the attributes of a storage item.

DateCreated

Read-onlyGets the date and time when the current item was created.

Name

Read-onlyGets the name of the item including the file name extension if there is one.

Path

Read-onlyGets the full file-system path of the item, if the item has a path.

 

Remarks

Note  If you simply want to work with files and folders in your app, see the StorageFile and StorageFolder classes.

Requirements (Windows 10 device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.Storage
Windows::Storage [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8

Namespace

Windows.Storage
Windows::Storage [C++]

Metadata

Windows.winmd

Attributes

[Version(0x06020000)]

 

 

Show:
© 2015 Microsoft