fileUri

text fileUri(path, flags)

Returns file path converted to a URI, used when “sharing” a file with another app, usually as Data URI or "android.intent.extra.STREAM" extra. Ensure to also enable the appropriate Grant flags where available.

Flags:

FlagDescription
"a"Convert path to a Automate content provider URI, the default
"d"Convert path to a system document URI (Android 4.4+)
"f"Convert path to a file URI

Parameters

  1. pathtext file path to convert to a URI.
  2. flags — optional text where each character is a flag.

Returns