Edit

Share via


StorageFileHelper.ReadBytesFromKnownFoldersFileAsync Method

Definition

Gets an array of bytes from a Windows.Storage.StorageFile located in a well known folder.

public static System.Threading.Tasks.Task<byte[]> ReadBytesFromKnownFoldersFileAsync (Windows.Storage.KnownFolderId knownFolderId, string fileName);
static member ReadBytesFromKnownFoldersFileAsync : Windows.Storage.KnownFolderId * string -> System.Threading.Tasks.Task<byte[]>
Public Function ReadBytesFromKnownFoldersFileAsync (knownFolderId As KnownFolderId, fileName As String) As Task(Of Byte())

Parameters

knownFolderId
Windows.Storage.KnownFolderId

The well known folder ID to use.

fileName
String

The relative String file path.

Returns

Task<Byte[]>

The stored Byte array.

Exceptions

Exception thrown if the fileName is null or empty.

Applies to