From 6ecbbcc282bb25fae4bcd2e9f394adb74ac60ae7 Mon Sep 17 00:00:00 2001 From: jussi Date: Wed, 6 Dec 2023 18:41:01 +0200 Subject: Files management functions. --- API.md | 54 +++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 45 insertions(+), 9 deletions(-) (limited to 'API.md') diff --git a/API.md b/API.md index 1bbb8b9..99e6035 100644 --- a/API.md +++ b/API.md @@ -4220,6 +4220,50 @@ Set Lua garbage collection to unload object data --- +> buffer = RL.LoadFileData( string fileName ) + +Load file data as byte array (read). Buffer type is BUFFER_UNSIGNED_CHAR + +- Success return Buffer + +--- + +> success = RL.SaveFileData( string fileName, buffer Buffer ) + +Save data to file from byte array (write), returns true on success + +- Success return bool + +--- + +> success = RL.ExportDataAsCode( Buffer buffer, string fileName ) + +Export data to code (.h), returns true on success + +- Success return bool + +--- + +> text = RL.LoadFileText( string fileName ) + +Load text data from file (read) + +- Success return string + +--- + +> success = RL.SaveFileText( string fileName, string text ) + +Save text data to file (write), returns true on success + +- Success return bool + +--- + +## Core - Files system functions + +--- + > path = RL.GetBasePath() Return game directory (where main.lua is located) @@ -4995,7 +5039,7 @@ Unload buffer data > data = RL.GetBufferData( Buffer buffer ) -Get buffer data as table in the format is was stored +Get buffer data as table in the format it was stored - Success return data{} @@ -5023,14 +5067,6 @@ Write buffer data to binary file --- -> success = RL.ExportBufferAsCode( Buffer buffer, string fileName ) - -Export buffer data to code (.h), returns true on success - -- Success return bool - ---- - ## Shapes - Basic shapes drawing functions --- -- cgit v1.2.3