Be concise.
Be useful.
All contributions dictatorially edited by webmasters to match personal tastes.
Please do not paste any copyright violating material.
Please try to avoid dependencies to third-party libraries and frameworks.
var x = File(path).lengthSync();
def main(path) do
_x =
path
|> File.stat!()
|> Map.get(:size)
end
program xx
implicit none
character(len=256) :: message
character(len=4096) :: filename
integer :: ios,x
logical :: foundit
filename='myfile'
inquire(file=filename,exist=foundit,size=x,iostat=ios,iomsg=message)
if(.not.foundit)then
write(*,*)'file ',trim(filename),' not found'
elseif(ios.ne.0)then
write(*,*)trim(message)
else
write(*,*)'size =',x,'bytes'
endif
end program xx
$x = filesize($path);
my $x = -s $path;
x = File.size(path)