Share via


IStorageFolder.GetFileAsync(String) Méthode

Définition

Obtient le fichier spécifié à partir du dossier actif.

public:
 IAsyncOperation<StorageFile ^> ^ GetFileAsync(Platform::String ^ name);
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<StorageFile> GetFileAsync(winrt::hstring const& name);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<StorageFile> GetFileAsync(string name);
function getFileAsync(name)
Public Function GetFileAsync (name As String) As IAsyncOperation(Of StorageFile)

Paramètres

name
String

Platform::String

winrt::hstring

Nom (ou chemin d’accès relatif au dossier actif) du fichier à récupérer.

Retours

Lorsque cette méthode se termine correctement, elle retourne un StorageFile qui représente le fichier.

Attributs

S’applique à

Voir aussi