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:
Flag | Description |
---|---|
"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 |
null
if "d"
flag conversion failed.