Closed lucsoft closed 3 years ago
Because data only can be string as the types says
(Assuming referring to https://nodejs.org/api/buffer.html), does accepting base 64 encoded strings meet your goal? Buffer
is not included in the base React Native (of course, users can add it as a dependency), so potentially a user would have a different source of binary data.
So for example if using Buffer
, the api call could be something like FileSystem.writeFile(path, buf.toString('base64'), 'base64')
?
Done in 72da4f85243b35b332c026d7360bf704c8574841.
Could you describe how this is different than the existing
FileSystem.writeFile(path: string, data: string)
?