@NonNull
    @Override
    public Uri toUri(@NonNull final File file) {
        return FileProvider
                .getUriForFile(getContext(),
                        getContext().getApplicationContext().getPackageName() + ".provider",
                        file);
    }
Convert the path to a URI for the return intent

@param file either a file or directory
@return a Uri
android/modules/module_filepicker/src/main/java/com/nononsenseapps/filepicker/FilePickerFragment.java