
5 Mar
2009
5 Mar
'09
2:20 p.m.
On Thu, 05 Mar 2009 19:56:42 +0100, Anish Muttreja
I am looking for a way to test if a file is empty. Something like isFileEmpty along the lines of System.Directory.doesFileExist?
A function that wraps stat would also serve the purpose. I get the feeling that someone must have felt the need for this before me, but Google search not yield anything, hence the question.
Thanks! Anish
Searching for "size" with Hoogle lead me to System.IO.hFileSize: hFileSize :: Handle -> IO Integer For a handle hdl which attached to a physical file, hFileSize hdl returns the size of that file in 8-bit bytes. -- Regards, Henk-Jan van Tuyl -- http://functor.bamikanarie.com http://Van.Tuyl.eu/ --