File.makedir

From MiniScript Wiki
Revision as of 00:45, 25 December 2022 by Khorne (talk | contribs) (Changed .delete to .makedir)
Jump to navigation Jump to search

The file.makedir method creates a new directory on disk.

Arguments

Parameter Name Default Value Meaning
path "" file name, partial path, or absolute path to directory to be created

If given a file name or partial path, it will be interpreted relative to the current working directory (see file.curdir).

Result

If the directory was successfully deleted, this method returns true (1). Otherwise, it returns false (0). This can happen if the given path is invalid, a file or directory already exists at that location, or any other file-level error occurs.

Example

The following attempts to create a directory called "data" in the current directory.

file.makedir "data"