FolderInformation.CreateFileAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
CreateFileAsync(String) |
Creates a new file in the current folder. |
CreateFileAsync(String, CreationCollisionOption) |
Creates a new file in the current folder, and specifies what to do if a file with the same name already exists in the current folder. |
CreateFileAsync(String)
Creates a new file in the current folder.
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)
Parameters
- desiredName
-
String
Platform::String
winrt::hstring
The name of the new file.
Returns
When this method completes successfully, it returns a StorageFile that represents the new file.
Implements
- Attributes
See also
Applies to
CreateFileAsync(String, CreationCollisionOption)
Creates a new file in the current folder, and specifies what to do if a file with the same name already exists in the current folder.
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)
Parameters
- desiredName
-
String
Platform::String
winrt::hstring
The name of the new file.
- options
- CreationCollisionOption
A value that indicates what to do if the file name already exists in the current folder.
Returns
When this method completes successfully, it returns a StorageFile that represents the new file.
Implements
- Attributes