🪛
MTools
  • 📷Description
  • ✏️Strings
  • 🔢Numbers
  • 📂Table
  • 📶Network
  • 🍪Client
  • 🗃️FileSystem
  • 🍭Render
  • 🧬Animation
  • 🧸AntiAims
  • ⚙️Threading
  • 💻Panorama
Powered by GitBook
On this page
  • CreateDir
  • GetGameDirectory
  • DeleteFile
  • ReadFolder

FileSystem

CreateDir

MTools.FileSystem.CreateDir(path);

Name
Type
Description

path

string

Path to directory

Allows you to create a directory. The Original Way: Counter-Strike Global Offensive

Example usage:

local create = MTools.FileSystem.CreateDir("TEST");
print(create);
-- If successful, it will return "The directory was successfully created.";
-- If performed poorly, it will return "An error occurred while creating the directory.";

GetGameDirectory

MTools.FileSystem.GetGameDirectory();

Name
Type
Description

-

-

-

Allows you to get a normal path to the game directory.

Example usage:

print(MTools.FileSystem.GetGameDirectory());
-- Return: c:\program files (x86)\steam\steamapps\common\Counter-Strike Global Offensive\

DeleteFile

MTools.FileSystem:DeleteFile(path, file, auto);

Name
Type
Description

path

string

Path to directory

file

string

File name

auto

boolean

Automatically get the path. If true, then only the directory name must be inserted into the path

Allows you to delete a file by name.

Example usage:

MTools.FileSystem:DeleteFile("nl\\", "Image.png", true);
-- Deletes the 'Image.png' file in the 'nl' directory.

ReadFolder

MTools.FileSystem:ReadFolder(path, auto);

Name
Type
Description

path

string

Path to directory

auto

boolean

Automatically get the path. If true, then only the directory name must be inserted into the path

Allows you to get all Files and Directories by path.

Example usage:

for Key, Value in pairs(MTools.FileSystem:ReadFolder("MonixLITE", true)) do
    print(Key, " ", Value);
end
-- Sends to the console all the files in the 'MonixLITE' folder in the 'Counter-Strike Global Offensive' directory.

-- [neverlose] 1 Fonts
-- [neverlose] 2 IMG
PreviousClientNextRender

Last updated 2 years ago

🗃️