Erlang - file_size
This method is used to determine the size of the file. This method is part of the filelib library.
filename − This is the file name for which the size needs to be determined.
A number which tells the size of the file.
-module(helloworld). -export([start/0]). start() -> io:fwrite("~w~n",[filelib:file_size("Renamed file.txt")]).
Depending on the contents of the file, the size of the file will be displayed. If the file contained the text “Example”, the output would be 7.