Keiwando.NFSO.NativeFileSO

instance method

SaveFile

public void SaveFile (FileToSave file) 

Summary

Presents a native dialog to the user which allows them to select an export location for the specified file and exports/copies the file to that location.

Parameters

file

An instance of the FileToSave class which holds information about the file to be exported.

Examples

The following example demonstrates how to export a file using a native interface.

 // We have a text file that we want to export
 string path = "path/to/existing/fileToSave.txt";
 string newFilename = "ExportedFile.txt";

 FileToSave file = new FileToSave(path, newFilename, SupportedFileType.PlainText);

 // Allows the user to choose a save location and saves the 
 // file to that location
 NativeFileSO.shared.SaveFile(file);