I don&#39;t use Haskell on Windows, but if you go to<br><br><a href="http://www.haskell.org/ghc/docs/latest/html/libraries/index.html">http://www.haskell.org/ghc/docs/latest/html/libraries/index.html</a><br><br>you&#39;ll find a package called 
System.Win32.File, which has these functions:<br><br><b>getFileAttributes</b> :: <a href="http://www.haskell.org/ghc/docs/latest/html/libraries/base/Data-Char.html#t%3AString">String</a> -&gt; <a href="http://www.haskell.org/ghc/docs/latest/html/libraries/base/System-IO.html#t%3AIO">
IO</a> <a href="http://www.haskell.org/ghc/docs/latest/html/libraries/Win32/System-Win32-File.html#t%3AFileAttributeOrFlag">FileAttributeOrFlag</a><br><br><b>getFileInformationByHandle</b> :: <a href="http://www.haskell.org/ghc/docs/latest/html/libraries/Win32/System-Win32-Types.html#t%3AHANDLE">
HANDLE</a> -&gt; <a href="http://www.haskell.org/ghc/docs/latest/html/libraries/base/System-IO.html#t%3AIO">IO</a> <a href="http://www.haskell.org/ghc/docs/latest/html/libraries/Win32/System-Win32-File.html#t%3ABY_HANDLE_FILE_INFORMATION">
BY_HANDLE_FILE_INFORMATION</a><br><br>The first has all sorts of attributes in it, the second has a field for length.&nbsp; Maybe these will do what you want.<br><br>cheers,<br>Fraser.<br><br><div><span class="gmail_quote">On 6/21/07, 
<b class="gmail_sendername">Andrew Coppin</b> &lt;<a href="mailto:andrewcoppin@btinternet.com">andrewcoppin@btinternet.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Andrea Rossato wrote:<br>&gt; On Thu, Jun 21, 2007 at 09:19:51PM +0100, Andrew Coppin wrote:<br>&gt;<br>&gt;&gt;&nbsp;&nbsp;OK, a few questions...<br>&gt;&gt;<br>&gt;&gt;&nbsp;&nbsp;1. Is there *any* way to determine how large a file is *without* opening it?
<br>&gt;&gt;&nbsp;&nbsp;The only library function I can find to do with file sizes is hFileSize;<br>&gt;&gt;&nbsp;&nbsp;obviously this only works for files that you have permission to open!<br>&gt;&gt;<br>&gt;<br>&gt; System.Posix.Files<br>&gt; fileSize
<br>&gt;<br><br>Does that *work* on Windoze?<br><br>Wait, hang on a sec... No, it doesn&#39;t. The module doesn&#39;t even exist.<br><br>(I was half-expecting it might work. GHC does currently run in a Unix<br>emulator...)
<br><br>&gt;&gt;&nbsp;&nbsp;2. Is there any way to discover Windoze-style &quot;attributes&quot; for files?<br>&gt;&gt;&nbsp;&nbsp;(Read-only, archive, system, hidden, et al.)<br>&gt;&gt;<br>&gt;<br>&gt; The module before, if I understand correctlu.
<br>&gt;<br><br>No, AFAIK the archive attribute doesn&#39;t even exist on POSIX. It&#39;s a<br>Windoze-specific thang.<br><br>_______________________________________________<br>Haskell-Cafe mailing list<br><a href="mailto:Haskell-Cafe@haskell.org">
Haskell-Cafe@haskell.org</a><br><a href="http://www.haskell.org/mailman/listinfo/haskell-cafe">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br></blockquote></div><br>