Logo

Programming-Idioms

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

Idiom #95 Get file size

Assign to variable x the length (number of bytes) of the local file at path.

with Ada.Directories; use Ada.Directories;
X : constant File_Size := Size (Path);

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