Logo

Programming-Idioms

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

Idiom #212 Check if folder exists

Set the boolean b to true if path exists on the filesystem and is a directory; false otherwise.

with Ada.Directories;
use Ada.Directories;
B : constant Boolean :=
    Exists (Path) and then Kind (Path) = Directory;

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