Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
DocumentPicker.Export
Shows dialog to export files.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
FileDialog | 9.1 | ❌ No | ❌ No | ❌ No | ❌ No | ✅ Yes |
MBS( "DocumentPicker.Export"; Paths ) More
Parameters
Parameter | Description | Example |
---|---|---|
Paths | Native file path list for the documents to pass. | "/Containers/testApp/Documents/test.txt" |
Result
Returns OK or error.
Description
Shows dialog to export files.The user selects an external destination. The document picker copies the document, leaving the original unchanged.
On success, we store the list of file paths and trigger script. Script is trigger with parameter "Pick" or "Cancel".
The file paths refer to new copies of the exported documents at the selected destination.
Warning: Function returns immediately and dialog shows after function returned asynchronously.
Examples
Export a temp file:
# build a native path:
Set Variable [ $path ; Value: MBS( "Path.AddPathComponent"; MBS( "Folders.UserTemporary" ); "test.txt") ]
# write a text file
Set Variable [ $r ; Value: MBS( "Text.WriteTextFile"; "Hello World"; $path; "UTF-8") ]
# and show export dialog:
Set Variable [ $r ; Value: MBS( "DocumentPicker.Export"; $path ) ]
See also
- DocumentPicker.Import
- DocumentPicker.Move
- DocumentPicker.Open
- Folders.UserTemporary
- Path.AddPathComponent
- Text.WriteTextFile
This function is free to use.
Created 28th January 2019, last changed 8th July 2020