From 9e2fc6bdbf31bd6393a3bf96817b21893eb84f96 Mon Sep 17 00:00:00 2001 From: Ponali Date: Thu, 26 Jun 2025 10:28:12 +0200 Subject: [PATCH] v1.11.0 - Improved the filesystem library to buffer file reading. --- argentum.cfg | 2 +- halyde/core/boot.lua | 2 +- halyde/lib/filesystem.lua | 100 ++++++++++++++++++++++++++++++++++++-- 3 files changed, 99 insertions(+), 5 deletions(-) diff --git a/argentum.cfg b/argentum.cfg index 5086a60..2a3bb80 100644 --- a/argentum.cfg +++ b/argentum.cfg @@ -1,7 +1,7 @@ local agcfg = { ["halyde"] = { ["maindir"] = "", - ["version"] = "1.10.0", + ["version"] = "1.11.0", ["description"] = "A universal, customizable and feature-packed operating system for OpenComputers.", ["directories"] = { "halyde/apps", diff --git a/halyde/core/boot.lua b/halyde/core/boot.lua index 7cfdc75..18125af 100644 --- a/halyde/core/boot.lua +++ b/halyde/core/boot.lua @@ -1,7 +1,7 @@ local loadfile = ... local filesystem = loadfile("/halyde/lib/filesystem.lua")(loadfile) -_G._OSVERSION = "Halyde 1.10.0" +_G._OSVERSION = "Halyde 1.11.0" _G._OSLOGO = "" local handle, tmpdata = filesystem.open("/halyde/config/oslogo.ans", "r"), nil repeat diff --git a/halyde/lib/filesystem.lua b/halyde/lib/filesystem.lua index a8f1906..c058af4 100644 --- a/halyde/lib/filesystem.lua +++ b/halyde/lib/filesystem.lua @@ -69,12 +69,60 @@ function filesystem.exists(path) -- check if path exists return component.invoke(address, "exists", absPath) end -function filesystem.open(path, mode) -- opens a file and returns its handle +local function readUniChar(readByte) + local function inRange(min,max,...) + for _,v in ipairs({...}) do + if not (v and v>=min and v