File Structure
Every files and folders are stored in a LuaU table called file_structure.
Each files have a Key name which is unique, and a string name.
They have an extension, file_type, specified by an attribute from a table extensions (see below)
Their parent folder is given as a string in parent field.
The content of a file is in the content field. Note that a folder content is a table.
And finally, their permissions are stored in permissions as attributes from a table permissions (see below)
local extensions = require(script.Parent.RACE.neurox_interpreter.extensions)
local permissions = require(script.Parent.RACE.neurox_interpreter.permissions)
local root = {}
root.file_structure = {
key_file_name = {
name = "file name",
file_type = extensions.file_type.f,
parent = "root",
content = {},
permissions = {permissions.perm.R, permissions.perm.W, permissions.perm.X, permissions.perm.D, permissions.perm.M}
},
-- etc
}
return rootlocal permissions = {}
permissions.perm = {
R = { description = "Read" },
W = { description = "Write" },
X = { description = "Execute" },
D = { description = "Delete" },
M = { description = "Modify" },
A = { description = "Administrator" },
S = { description = "System" },
}
return permissions
local extensions = {}
extensions.file_type = {
f = {
name = "folder",
extension = "f",
description = "A folder or directory that contains files",
default_program = nil,
icon = "",
category = "system",
mime_type = nil,
size = "Varies",
},
-- etc
}
return extensionsLast updated