Re: [Haskell-cafe] Test if a file is empty or stat in haskell

2009-03-06 Thread Anish Muttreja
On Thu, Mar 05, 2009 at 03:43:22PM -0500, Thomas DuBuisson wrote: getFileStatus, fileSize ... Great, thanks. BTW, Hoogle does not seem to  know about System.Posix.Files, though it did point me to System.IO.FileSize which would also have served the purpose. Yep, this was discussed in

[Haskell-cafe] Test if a file is empty or stat in haskell

2009-03-05 Thread 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

Re: [Haskell-cafe] Test if a file is empty or stat in haskell

2009-03-05 Thread Daniel Fischer
Am Donnerstag, 5. März 2009 19:56 schrieb 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? If you're on a *nixy OS, System.Posix.Files getFileStatus, fileSize ... dunno if Windows has similar

Re: [Haskell-cafe] Test if a file is empty or stat in haskell

2009-03-05 Thread Henk-Jan van Tuyl
On Thu, 05 Mar 2009 19:56:42 +0100, Anish Muttreja anishmuttr...@gmail.com wrote: 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

Re: [Haskell-cafe] Test if a file is empty or stat in haskell

2009-03-05 Thread Anish Muttreja
On Thu, Mar 05, 2009 at 08:15:03PM +0100, Daniel Fischer wrote: Am Donnerstag, 5. März 2009 19:56 schrieb 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? If you're on a *nixy OS,

Re: [Haskell-cafe] Test if a file is empty or stat in haskell

2009-03-05 Thread Neil Mitchell
Hi I am on Linux. BTW, Hoogle does not seem to  know about System.Posix.Files, though it did point me to System.IO.FileSize which would also have served the purpose. To build the Hoogle libraries I need to build the packages. I run Windows not Linux, so its a bit difficult to index

Re: [Haskell-cafe] Test if a file is empty or stat in haskell

2009-03-05 Thread Thomas DuBuisson
getFileStatus, fileSize ... Great, thanks. BTW, Hoogle does not seem to  know about System.Posix.Files, though it did point me to System.IO.FileSize which would also have served the purpose. Yep, this was discussed in a Hoogle and Network.Socket thread I started last week. There is a wiki