FileIO.ReadTextAsync 메서드

정의

오버로드

ReadTextAsync(IStorageFile)

지정된 파일의 내용을 읽고 텍스트를 반환합니다.

ReadTextAsync(IStorageFile, UnicodeEncoding)

지정된 문자 인코딩을 사용하여 지정된 파일의 내용을 읽고 텍스트를 반환합니다.

ReadTextAsync(IStorageFile)

지정된 파일의 내용을 읽고 텍스트를 반환합니다.

public:
 static IAsyncOperation<Platform::String ^> ^ ReadTextAsync(IStorageFile ^ file);
/// [Windows.Foundation.Metadata.Overload("ReadTextAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<winrt::hstring> ReadTextAsync(IStorageFile const& file);
[Windows.Foundation.Metadata.Overload("ReadTextAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<string> ReadTextAsync(IStorageFile file);
function readTextAsync(file)
Public Shared Function ReadTextAsync (file As IStorageFile) As IAsyncOperation(Of String)

매개 변수

file
IStorageFile

읽을 파일입니다.

반환

IAsyncOperation<String>

IAsyncOperation<Platform::String>

IAsyncOperation<winrt::hstring>

이 메서드가 성공적으로 완료되면 파일의 내용을 텍스트 문자열로 반환합니다.

특성

설명

IStorageFile 인터페이스를 구현하는 모든 개체는 파일 매개 변수를 통해 이 메서드 또는 해당 오버로드에 전달될 수 있습니다.

이 메서드는 지정된 파일의 문자 인코딩을 사용합니다. 다른 인코딩을 지정하려면 ReadTextAsync(IStorageFile, UnicodeEncoding) 를 대신 호출합니다.

추가 정보

적용 대상

ReadTextAsync(IStorageFile, UnicodeEncoding)

지정된 문자 인코딩을 사용하여 지정된 파일의 내용을 읽고 텍스트를 반환합니다.

public:
 static IAsyncOperation<Platform::String ^> ^ ReadTextAsync(IStorageFile ^ file, UnicodeEncoding encoding);
/// [Windows.Foundation.Metadata.Overload("ReadTextWithEncodingAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<winrt::hstring> ReadTextAsync(IStorageFile const& file, UnicodeEncoding const& encoding);
[Windows.Foundation.Metadata.Overload("ReadTextWithEncodingAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<string> ReadTextAsync(IStorageFile file, UnicodeEncoding encoding);
function readTextAsync(file, encoding)
Public Shared Function ReadTextAsync (file As IStorageFile, encoding As UnicodeEncoding) As IAsyncOperation(Of String)

매개 변수

file
IStorageFile

읽을 파일입니다.

encoding
UnicodeEncoding

사용할 문자 인코딩입니다.

반환

IAsyncOperation<String>

IAsyncOperation<Platform::String>

IAsyncOperation<winrt::hstring>

이 메서드가 성공적으로 완료되면 파일의 내용을 텍스트 문자열로 반환합니다.

특성

추가 정보

적용 대상