IStorageItem IStorageItem IStorageItem IStorageItem IStorageItem Interface

Definition

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

Important

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

public : interface IStorageItem
struct winrt::Windows::Storage::IStorageItem
public interface IStorageItem
Public Interface IStorageItem
// You can't instantiate an interface directly in JavaScript. You can use objects that implement the interface, however.
Attributes

Windows 10 requirements

Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Properties

Attributes Attributes Attributes Attributes Attributes

Gets the attributes of a storage item.

DateCreated DateCreated DateCreated DateCreated DateCreated

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

Name Name Name Name Name

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

Path Path Path Path Path

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

Methods

DeleteAsync() DeleteAsync() DeleteAsync() DeleteAsync() DeleteAsync()

Deletes the current item.

DeleteAsync(StorageDeleteOption) DeleteAsync(StorageDeleteOption) DeleteAsync(StorageDeleteOption) DeleteAsync(StorageDeleteOption) DeleteAsync(StorageDeleteOption)

Deletes the current item, optionally deleting it permanently.

GetBasicPropertiesAsync() GetBasicPropertiesAsync() GetBasicPropertiesAsync() GetBasicPropertiesAsync() GetBasicPropertiesAsync()

Gets the basic properties of the current item (like a file or folder).

IsOfType(StorageItemTypes) IsOfType(StorageItemTypes) IsOfType(StorageItemTypes) IsOfType(StorageItemTypes) IsOfType(StorageItemTypes)

Determines whether the current IStorageItem matches the specified StorageItemTypes value.

RenameAsync(String) RenameAsync(String) RenameAsync(String) RenameAsync(String) RenameAsync(String)

Renames the current item.

RenameAsync(String, NameCollisionOption) RenameAsync(String, NameCollisionOption) RenameAsync(String, NameCollisionOption) RenameAsync(String, NameCollisionOption) 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.