DownloadsFolder.CreateFileAsync 메서드

정의

오버로드

CreateFileAsync(String)

다운로드 폴더 내에 새 파일을 만듭니다.

CreateFileAsync(String, CreationCollisionOption)

Downloads 폴더에 새 파일을 만들고 이름이 같은 파일이 다운로드 폴더에 이미 있는 경우 수행할 작업을 지정합니다.

CreateFileAsync(String)

다운로드 폴더 내에 새 파일을 만듭니다.

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

매개 변수

desiredName
String

Platform::String

winrt::hstring

만들 파일의 원하는 이름입니다.

지정된 이름의 파일이 이미 있는 경우 유사하지만 고유한 이름이 사용됩니다. 예를 들어 desiredName 이 "MyFileName.jpg"이고 해당 이름의 파일이 Downloads 폴더에 이미 있는 경우 새 파일은 대신 "MyFileName (1).jpg"과 같은 이름으로 만들어집니다.

반환

이 메서드가 완료되면 새 파일을 StorageFile 개체로 반환합니다.

특성

추가 정보

적용 대상

CreateFileAsync(String, CreationCollisionOption)

Downloads 폴더에 새 파일을 만들고 이름이 같은 파일이 다운로드 폴더에 이미 있는 경우 수행할 작업을 지정합니다.

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

매개 변수

desiredName
String

Platform::String

winrt::hstring

만들 파일의 원하는 이름입니다.

현재 폴더에 이미 desiredName이 지정된 기존 파일이 있는 경우 지정된 CreationCollisionOption 은 Windows가 충돌에 대응하는 방법을 결정합니다.

option
CreationCollisionOption

desiredName이 현재 폴더에 있는 기존 파일의 이름과 같은 경우 Windows가 응답하는 방법을 결정하는 열거형 값입니다.

앱은 만든 다운로드 폴더의 파일에만 액세스할 수 있으므로 이 매개 변수에 대해 OpenIfExists 또는 ReplaceExisting을 지정할 수 없습니다.

반환

이 메서드가 완료되면 새 파일을 StorageFile 개체로 반환합니다.

특성

추가 정보

적용 대상