Logo

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)
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;
FileUtils.mkpath( path )
use std::fs;
fs::create_dir_all(path)?;
use std::fs;
fs::create_dir(path)?;

New implementation...
< >
programming-idioms.org