RbxStu V3 Docs
  • Welcome
  • Information
    • Engine Information
      • Luau API Security
  • Stunc
    • Overview
    • Connections
    • Filesystem
      • readfile
      • writefile
      • appendfile
      • isfile
      • isfolder
      • listfiles
      • makefolder
      • delfile
      • delfolder
      • loadfile
      • dofile
  • Memory
    • getgc
    • reference_object
    • unreference_object
    • get_gc_threshold
  • Closures
    • isunhookable
    • makeunhookable
    • ishooked
    • restorefunction
    • hookfunction
    • hookmetamethod
    • isourclosure
    • iscclosure
    • islclosure
    • clonefunction
    • newcclosure
    • newlclosure
    • loadstring
Powered by GitBook
On this page
  1. Stunc
  2. Filesystem

makefolder

Overview of the makefolder function.

Function definition
function makefolder(path: string): ()

Errors:

  • Illegal Path

    • The path provided is considered 'unsafe'.

Remarks

If the provided path is nested inside of non-existing folders, makefolder will create all the folders up to path.

High-Level Overview:

Creates a folder at path.

Low-Level Overview:

pathis read from the luau heap, then utilising std::filesystem::is_directory we validate if the provided path (once sanitised) is pointing to a valid folder in the filesystem; if it is not, we create it using std::filesystem::create_directories, which allows for nested directories, even if they've not been created previously.

PreviouslistfilesNextdelfile

Last updated 4 months ago