File.makedir

From MiniScript Wiki
Revision as of 04:04, 17 July 2021 by JoeStrout (talk | contribs) (Created page with "The <c>file.makedir</c> method creates a new directory on disk. === Arguments === {| class="wikitable" |- ! Parameter Name !! Default Value !! Meaning |- | path || "" ||...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.delete "data"