UriKt

Added in 1.1.0

public final class UriKt


Summary

Public methods

static final @NonNull File
toFile(@NonNull Uri receiver)

Creates a File from the given Uri.

static final @NonNull Uri
toUri(@NonNull File receiver)

Creates a Uri from the given file.

static final @NonNull Uri
toUri(@NonNull String receiver)

Creates a Uri from the given encoded URI string.

Public methods

toFile

public static final @NonNull File toFile(@NonNull Uri receiver)

Creates a File from the given Uri. Note that this will throw an IllegalArgumentException when invoked on a Uri that lacks file scheme.

toUri

public static final @NonNull Uri toUri(@NonNull File receiver)

Creates a Uri from the given file.

See also
fromFile

toUri

public static final @NonNull Uri toUri(@NonNull String receiver)

Creates a Uri from the given encoded URI string.

See also
parse