File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -331,6 +331,25 @@ After running the two code snippets above, file should contain:
331331>
332332> Beware of flatlines...
333333
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+ ``` swift
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+
334353### Read Json
335354``` swift
336355// File
You can’t perform that action at this time.
0 commit comments