Bagikan melalui


FolderInformation.CreateFileAsync Metode

Definisi

Overload

CreateFileAsync(String)

Membuat file baru di folder saat ini.

CreateFileAsync(String, CreationCollisionOption)

Membuat file baru di folder saat ini, dan menentukan apa yang harus dilakukan jika file dengan nama yang sama sudah ada di folder saat ini.

CreateFileAsync(String)

Membuat file baru di folder saat ini.

public:
 virtual IAsyncOperation<StorageFile ^> ^ CreateFileAsync(Platform::String ^ desiredName) = CreateFileAsync;
/// [Windows.Foundation.Metadata.Overload("CreateFileAsyncOverloadDefaultOptions")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<StorageFile> CreateFileAsync(winrt::hstring const& desiredName);
[Windows.Foundation.Metadata.Overload("CreateFileAsyncOverloadDefaultOptions")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<StorageFile> CreateFileAsync(string desiredName);
function createFileAsync(desiredName)
Public Function CreateFileAsync (desiredName As String) As IAsyncOperation(Of StorageFile)

Parameter

desiredName
String

Platform::String

winrt::hstring

Nama file baru.

Mengembalikan

Ketika metode ini berhasil diselesaikan, metode ini mengembalikan StorageFile yang mewakili file baru.

Penerapan

M:Windows.Storage.IStorageFolder.CreateFileAsync(System.String) M:Windows.Storage.IStorageFolder.CreateFileAsync(Platform::String) M:Windows.Storage.IStorageFolder.CreateFileAsync(winrt::hstring)
Atribut

Lihat juga

Berlaku untuk

CreateFileAsync(String, CreationCollisionOption)

Membuat file baru di folder saat ini, dan menentukan apa yang harus dilakukan jika file dengan nama yang sama sudah ada di folder saat ini.

public:
 virtual IAsyncOperation<StorageFile ^> ^ CreateFileAsync(Platform::String ^ desiredName, CreationCollisionOption options) = CreateFileAsync;
/// [Windows.Foundation.Metadata.Overload("CreateFileAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<StorageFile> CreateFileAsync(winrt::hstring const& desiredName, CreationCollisionOption const& options);
[Windows.Foundation.Metadata.Overload("CreateFileAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<StorageFile> CreateFileAsync(string desiredName, CreationCollisionOption options);
function createFileAsync(desiredName, options)
Public Function CreateFileAsync (desiredName As String, options As CreationCollisionOption) As IAsyncOperation(Of StorageFile)

Parameter

desiredName
String

Platform::String

winrt::hstring

Nama file baru.

options
CreationCollisionOption

Nilai yang menunjukkan apa yang harus dilakukan jika nama file sudah ada di folder saat ini.

Mengembalikan

Ketika metode ini berhasil diselesaikan, metode ini mengembalikan StorageFile yang mewakili file baru.

Penerapan

M:Windows.Storage.IStorageFolder.CreateFileAsync(System.String,Windows.Storage.CreationCollisionOption) M:Windows.Storage.IStorageFolder.CreateFileAsync(Platform::String,Windows.Storage.CreationCollisionOption) M:Windows.Storage.IStorageFolder.CreateFileAsync(winrt::hstring,Windows.Storage.CreationCollisionOption)
Atribut

Lihat juga

Berlaku untuk