Ada.Directories.Modification_Time Example

with Ada.Text_IO;
with Ada.Directories;
with Ada.Calendar.Formatting;
 
procedure aDir is
   package IO renames Ada.Text_IO;
   package D renames Ada.Directories;
   package ACF renames Ada.Calendar.Formatting;
begin
   IO.Put ("Starting default directory: ");
   IO.Put_Line (Item => D.Current_Directory);
 
   IO.Put_Line (Item => ACF.Image (D.Modification_Time (Name => "some_file")));
end aDir;

Go back


Navigation