Resource icon

Other OOP Lightweight File System

No permission to download

0cguboss

Registered
Joined
Jun 7, 2025
Messages
13
0cguboss submitted a new item:

OOP Lightweight File System - Filesystem

local FileSystem = require("filesystem")

local fs = FileSystem.new()

-- Check existence
print("Does 'test.txt' exist?", fs:exists("test.txt"))

-- Create directory
fs:create_dir("my_folder")

-- Copy a file
fs:copy_file("test.txt", "my_folder\\copy_test.txt")

-- Move a file
fs:move_file("my_folder\\copy_test.txt", "my_folder\\moved_test.txt")

-- Delete a file or folder
fs:remove("my_folder\\moved_test.txt")

-- Get full absolute path
print("Full path:", fs:get_absolute_path("test.txt"))...

Read more...
 
Back
Top