An Overview of Files and Folders

The core representation of storage objects in the Windows Runtime is the IStorageItem interface. It supports rename and delete operations, and getting/setting basic properties. Additional methods are placed on an IStorageItem2 interface: IsEqual, which reports if two IStorageItems are the same, and GetParentAsync, which returns the parent folder if you can access it. GetParentAsync is useful if all you have is a file but you want to save a separate file alongside it in the same folder.

Two classes implement IStorageItem (and IStorageItem2): StorageFile and StorageFolder. On top of StorageItem, StorageFile supports move and copy operations, getting extended properties and thumbnails, and being opened as a stream. ...

Get Universal Windows® Apps with XAML and C# Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.