This language bar is your friend. Select your favorite languages!

Idiom #211 Create folder

Create the folder at path on the filesystem

FileUtils.mkpath( path )
import "os"
err := os.Mkdir(path, os.ModeDir)
import "os"
err := os.MkdirAll(path, os.ModeDir)
sysutils
MkDir(path);
use Path::Tiny qw(path);
path($path)->mkpath;
import os
os.mkdir(path)

Do you know the best way to do this in your language ?
New implementation...

Idiom created by

programming-idioms.org

Related idioms