We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c2a4a02 commit ce2e70fCopy full SHA for ce2e70f
1 file changed
README.md
@@ -331,6 +331,25 @@ After running the two code snippets above, file should contain:
331
>
332
> Beware of flatlines...
333
334
+### Read raw data
335
+```swift
336
+// File
337
+public func ReadAsBase64() -> String;
338
+
339
+// AsyncFile
340
+public func ReadAsBase64(promise: FilePromise) -> Void;
341
+```
342
343
+You can read binary data (e.g. PNG file) as an encoded Base64 string.
344
345
+let file = FileSystem.GetSharedStorage().GetFile("screenshot.png");
346
+let data = file.ReadAsBase64();
347
348
349
+> [!NOTE]
350
+> This feature was introduced in `v0.13.0`. This version was not released on
351
+> NexusMod on purpose. It might be published later with a future update.
352
353
### Read Json
354
```swift
355
// File
0 commit comments