im a beginner in DELPHI and i have one question.. how to call this function and use it, i want to show the result in a label, also how to declare the function in the correct way, many thanks in advance.
function FindFileSize(Filename:string):integer;
var
sr : TSearchRec;
begin
if FindFirst(filename,faAnyFile-faDirectory,sr) = 0 then
Result := sr.Size
else
raise EFileNotFoundException.Create(filename+' not found.');
FindClose(sr);
end;