Re: getfileinfo File Size?

new topic     » goto parent     » topic index » view thread      » older message » newer message

robby1066 wrote:

> I've been searching all through the documentation and forums for an
> answer to this.

Look here in the documentation: HTML/lib_c_d.htm#dir

> Can someone point me in the direction of a straightforward way to get a
> non-open file's filesize? it seems like it should get returned with the
> getfileinfo function, but I can't seem to find any documenation on it?
>
> Thanks!

-- Demo
include file.e
object x
sequence fileName

fileName = "test.txt"
x = dir(fileName)
if atom(x) then
   printf(1, "File '%s' not found.", {fileName})
else
   printf(1, "Size of file '%s' is %d bytes.", {fileName, x[1][D_SIZE]})
end if


Regards,
   Juergen

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu