#filesize()
DESCRIPTION
returns a file's size (in bytes)
SYNOPSIS
#filesize(s)
ARGUMENTS
s - a quoted string, or string expression, representing a filepath
EXAMPLES
# pikt +C 'output $text(#filesize("/etc/passwd"))'
2139
rule
set #fs = #filesize($inlin)
rule
if #fs != %fs
output mail "for $inlin, size has changed, is $text(#fs) bytes, was $text(%fs) bytes"
fi
rule
if -e $name
set #size = #filesize($name)
else
output mail "$name not found!"
set #size = 0
next
endif
rule // get log file size, in lines for text files, and KB for
// binary files
set #size = #if(#binary, #filesize($name)/=KB,
#val($command("=wc -l $name | =awk '{print \$1}'")))
SEE ALSO
#fileino()
#filelinks()
#fileuid()
#filegid()
#fileatime()
#filectime()
#filemtime()
Numerical Functions
String Functions