FolderInformation.CreateFileAsync Metode
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
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
- 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
- Atribut