This is an old revision of the document!

with Ada.Text_IO;
with Ada.Directories;
procedure aDir is
   package IO renames Ada.Text_IO;
   package D renames Ada.Directories;
   IO.Put ("Starting default directory: ");
   IO.Put_Line (Item => D.Current_Directory);
   D.Create_Path (New_Directory => "this/is/a/new/directory");
   if D.Exists (Name => "this/is/a/new/directory") then
      IO.Put_Line (Item => "this/is/a/new/directory exists!");
   end if;
   D.Delete_Tree (Directory => "this/");
   if not D.Exists (Name => "this/") then
      IO.Put_Line (Item => "this/is/a/new/directory does NOT exist!");
   end if;
end aDir;

Go back