public override IAsyncOperation <BaseStorageFile> CopyAsync(IStorageFolder destinationFolder, string desiredNewName, NameCollisionOption option) { return(AsyncInfo.Run(async(cancellationToken) => { using var ftpClient = GetFtpClient(); if (!await ftpClient.EnsureConnectedAsync()) { return null; } BaseStorageFolder destFolder = destinationFolder.AsBaseStorageFolder(); BaseStorageFile file = await destFolder.CreateFileAsync(desiredNewName, option.Convert()); var stream = await file.OpenStreamForWriteAsync(); return await ftpClient.DownloadAsync(stream, FtpPath, token: cancellationToken) ? file : null; })); }
public BaseStorageFileQueryResult(BaseStorageFolder folder, QueryOptions options) { Folder = folder; Options = options; }