Logo

Programming-Idioms

Create the folder at path on the filesystem
New implementation

Be concise.

Be useful.

All contributions dictatorially edited by webmasters to match personal tastes.

Please do not paste any copyright violating material.

Please try to avoid dependencies to third-party libraries and frameworks.

Other implementations
with Ada.Directories;
Ada.Directories.Create_Directory (New_Directory => Path);
#include <filesystem>
namespace fs = std::filesystem;
fs::create_directory(path);
Directory.CreateDirectory(path)
import 'dart:io';
Directory(path).create();
import "os"
err := os.MkdirAll(path, os.ModeDir)
import "os"
err := os.Mkdir(path, os.ModeDir)
import { mkdir } from 'fs/promises';
await mkdir(path);
import java.io.File;
boolean ok = new File(path).mkdirs();
uses sysutils;
MkDir(path);
use Path::Tiny qw(path);
path($path)->mkpath;
import os
os.mkdir(path)
FileUtils.mkpath( path )
use std::fs;
fs::create_dir_all(path)?;
use std::fs;
fs::create_dir(path)?;