traversc / qs

Quick serialization of R objects
397 stars 19 forks source link

Need to check for writeable path #73

Closed Shians closed 1 year ago

Shians commented 1 year ago

Currently if a given path is not writable then the error returned is uninformative for an R user. I suggest checking the path is writable in R before calling the C++ code since working with filesystem in C++ is a massive pain prior to C++17.

data(iris)

qs::qsave(iris, "DoesNotExist/iris.qs")
#> Error in qs::qsave(iris, "DoesNotExist/iris.qs"): ios_base::clear: unspecified iostream_category error

Created on 2022-10-12 with reprex v2.0.2