OxL Справочник OxL
РусскийEnglish

method fs.createDir

Creates one directory; fails with AlreadyExists if it exists and with NotFound if the parent is missing.

Example:

oxl✓ проверяется в CI
use std.io { File, fs }

fn main() io {
  let dir = fs.tempDir()!
  fs.createDir("{dir}/sub")!
  print("{File.isDir("{dir}/sub")}")
  fs.removeAll(dir)!
}
Вывод
true
pub(api) static fn createDir(path: str) -> () | IoError  io

С версии. 1.0.0-beta

Параметры

ИмяТип
pathstr

Возвращает

()

Ошибки

Эффекты

io

Определено в: std/io/io.oxl:664

См. также