/// <summary> /// Extract a zip file. /// </summary> /// <param name="desinationFolder">The destination folder for zip file extraction</param> /// <param name="collisionOption">How to deal with collisions with existing files.</param> /// <param name="cancellationToken">The cancellation token.</param> /// <returns>A task with a List of strings containing the names of extracted files from the zip archive.</returns> public async Task <List <string> > ExtractZipAsync(IFolder desinationFolder, NameCollisionOption collisionOption = NameCollisionOption.ReplaceExisting, CancellationToken cancellationToken = default(CancellationToken)) { return(await TargetPlatformFileSystem.ExtractZipAsync(this, desinationFolder, collisionOption, cancellationToken)); }
/// <summary> /// Writes a stream to the file /// </summary> /// <param name="stream">The data stream which should be written to the file.</param> /// <param name="fileAccess">Specifies whether the file should be overridden.</param> /// <param name="cancellationToken">The cancellation token.</param> /// <returns>A <see cref="bool"/> returns true for success</returns> public async Task <bool> WriteAsync(Stream stream, CancellationToken cancellationToken) { return(await TargetPlatformFileSystem.WriteStreamAsync(this, stream, cancellationToken)); }
/// <summary> /// Gets a file from the App Bundle. Returns null if the file does not exist. /// </summary> /// <param name="path">The path to a file, as returned from the <see cref="IFile.Path"/> property.</param> /// <param name="cancellationToken">The cancellation token.</param> /// <returns>A file for the given path, or null if it does not exist.</returns> //public partial Task<IFile> GetFileFromAppBundleAsync(string path, CancellationToken cancellationToken); //public virtual Task<IFile> GetFileFromAppBundleAsync(string path, CancellationToken cancellationToken); public async Task <IFile> GetFileFromAppBundleAsync(string path, CancellationToken cancellationToken) { return(await TargetPlatformFileSystem.GetFileFromAppBundleAsync(path, cancellationToken)); }