Skip to content

Latest commit

 

History

History
37 lines (25 loc) · 1.75 KB

storagefolder_getitemsasync_561011846.md

File metadata and controls

37 lines (25 loc) · 1.75 KB
-api-id -api-type
M:Windows.Storage.StorageFolder.GetItemsAsync(System.UInt32,System.UInt32)
winrt method

Windows.Storage.StorageFolder.GetItemsAsync

-description

Gets an index-based range of files and folders from the list of all files and subfolders in the current folder.

-parameters

-param startIndex

The zero-based index of the first item in the range to get.

-param maxItemsToRetrieve

The maximum number of items to get.

-returns

When this method completes successfully, it returns a list of the files and subfolders in the current folder. The list is of type IReadOnlyList<IStorageItem>. Each item in the list is represented by an IStorageItem object.

To work with the returned items, call the IsOfType method of the IStorageItem interface to determine whether each item is a file or a folder. Then cast the item to a StorageFolder or StorageFile.

-exceptions

T:System.UnauthorizedAccessException

You don't have permission to access the contents of the current folder. For more information, see File access permissions.

-remarks

-examples

-see-also

File access permissions, GetItemsAsync, GetFilesAsync, GetFoldersAsync