Programming-Idioms

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

Idiom #211 Create folder

Create the folder at path on the filesystem

import os
os.mkdir(path)
#include <filesystem>
namespace fs = std::filesystem;
fs::create_directory(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;
FileUtils.mkpath( path )
use std::fs;
fs::create_dir(path)?;

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

Idiom created by

programming-idioms.org

Related idioms