Ada.Directories.Size Example

with Ada.Text_IO;
with Ada.Directories;
 
procedure aDir is
   package IO renames Ada.Text_IO;
   package D renames Ada.Directories;
begin
   IO.Put ("Starting default directory: ");
   IO.Put_Line (Item => D.Current_Directory);
 
   IO.Put_Line (Item => D.Size (Name => "some_file")'Img);
   IO.Put_Line (Item => D.Size (Name => "adir")'Img);
   IO.Put_Line 
     (Item => "Max File_Size on this system: " & Long_Long_Integer'Last'Img);
end aDir;

Go back


Navigation