ποΈFileSystem
CreateDir
MTools.FileSystem.CreateDir(path);
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();
-
-
-
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);
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);
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
Last updated