It does just that, you can see the code here,
readstoplist(const char *fname, StopList *s, char *(*wordop) (const char *))
char **stop = NULL;
s->len = 0;
if (fname && *fname)
char *filename = get_tsearch_config_filename(fname, "stop");
int reallen = 0;
**stop could be modified easily to read from the yet-nonexistant parameters, but currently it just pulls from the file. A few lines above and you'll find
get_tsearch_config_filename(fname,extension) which looks in just the place you were referring too,
snprintf(result, MAXPGPATH, "%s/tsearch_data/%s.%s",
sharepath, basename, extension);
There is nothing else in the code base that writes to a
StopList pointer. As of PostgreSQL 10, it's not possible.
There is an unresolved issue from 2014 on AWS Developer for this,
Amazon confirms we're right in saying there is no way
Unfortunately, because RDS doesn't provide filesystem access, you won't be able to upload your custom files to $SHAREDIR.
And Amazon follows up with
I have raised a feature request with the RDS team.