I still think this function should only allow passing in 2 values, designating either opening it read-only or read-write.
(A good choice to represent 2 values in a lot of cases is a boolean, perhaps as a labeled argument if that suits you better.)