cpp/experimental/fs/file size

Returns the size of the regular file, determined as if by reading the member of the structure obtained by POSIX stat (symlinks are followed)

Attempting to determine the size of a directory (as well as any other file that is not a regular file or a symlink) is treated as an error.

The non-throwing overload returns returns on errors.

Return value
The size of the file, in bytes.