IStorageItem interface

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-only

Gets the attributes of a storage item.

DateCreated

Read-only

Gets the date and time when the current item was created.

Name

Read-only

Gets the name of the item including the file name extension if there is one.

Path

Read-only

Gets 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, introduced version 10.0.10240.0

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:
© 2016 Microsoft