Saves the contents of a file to a resource identified by its URI.
// Opens the resource selector in creation mode
uriDocImage is URI = URISelect(uriImage, uriCreate)
IF NOT ErrorOccurred THEN
// Save the image in the new document
<Result> = FileToURI(<File to save> , <Destination URI> [, <Mode>])
If an error occurs, the ErrorOccurred variable is set to True. To get more details on the error, use ErrorInfo.
- True if saved successfully,
- false otherwise.
<File to save>: Character string
Path of the file to be saved. This file must exist.
<Destination URI>: Character string or URI variable
Resource to which the file should be saved. This resource can be identified:
Remark: The specified URI must be of type "file" (external file) or "content" (resource from a content provider) and be writable.
- by a string corresponding to a URI,
- by a variable of type URI.
<Mode>: Optional Integer constant
|uriAdd||The contents of the file are added at the end of the initial contents of the resource. |
|The initial contents of the resource are replaced by the contents of the file. |
To select a resource and get its URI, use URISelect
Business / UI classification: UI Code