Logo

Programming-Idioms

  • Pascal
  • Rust

Idiom #211 Create folder

Create the folder at path on the filesystem

use std::fs;
fs::create_dir_all(path)?;

create_dir_all creates intermediate parent folders as needed
use std::fs;
fs::create_dir(path)?;

This doesn't create parent directories. fs::create_dir_all does.
uses sysutils;
MkDir(path);
with Ada.Directories;
Ada.Directories.Create_Directory (New_Directory => Path);

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