Edit

Share via


StorageFileHelper.ReadBytesFromFileAsync(StorageFolder, String) Method

Definition

Gets an array of bytes from a Windows.Storage.StorageFile located in the given Windows.Storage.StorageFolder.

public static System.Threading.Tasks.Task<byte[]> ReadBytesFromFileAsync (this Windows.Storage.StorageFolder fileLocation, string fileName);
static member ReadBytesFromFileAsync : Windows.Storage.StorageFolder * string -> System.Threading.Tasks.Task<byte[]>
<Extension()>
Public Function ReadBytesFromFileAsync (fileLocation As StorageFolder, fileName As String) As Task(Of Byte())

Parameters

fileLocation
Windows.Storage.StorageFolder

The Windows.Storage.StorageFolder to save the file in.

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