Subbu, thanks for the hint to look for the directoryEntry.<br><br>I have working code (see example).<br>When I inspect aFile then the other variables are there (for instance, there is a creationTime which contains a number, and there is a fileSize).<br>
But the fileSize = 0.<br><br>1. What is going wrong with the fileSize, because the file is much bigger than 0!<br><br>2. How can I change creationTime to something readable? Now it is a LargePositiveInteger, not very useful to display.<br>
<br>| aFileDir aFile | <br><br>    aFileDir := (FileDirectory default directoryNamed: &#39;mytestdir&#39;).<br>    aFile := aFileDir directoryEntryFor: &#39;my test file.mp3&#39;.<br>    Transcript cr;show: aFile creationTime printString.<br>
    Transcript cr;show: aFile fileSize printString.<br><br>Regards,<br>Van.<br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

Hi,<br>
<br>
I&#39;m listing files in a directory, but I want to show more than just the<br>
filename (like file size and may be creation date). I&#39;ve searched for some<br>
time on the Internet, but I can&#39;t find the answer. How to do this?<br>
<br>
I&#39;ve tried this:<br>
    aFile := (FileDirectory default directoryNamed: directoryName)<br>
            assureExistence;<br>
            readOnlyFileNamed: &#39;testfile.pdf&#39;.<br>
    and then tried: aFile size but that doesn&#39;t seem to work.<br>
<br>
Regards,<br>
Van.<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://lists.squeakfoundation.org/pipermail/beginners/attachments/20100320/c8e4ab01/attachment-0001.htm" target="_blank">http://lists.squeakfoundation.org/pipermail/beginners/attachments/20100320/c8e4ab01/attachment-0001.htm</a><br>

<br>
------------------------------<br>
<br>
Message: 5<br>
Date: Sat, 20 Mar 2010 21:11:59 +0530<br>
From: &quot;K. K. Subramaniam&quot; &lt;<a href="mailto:subbukk@gmail.com">subbukk@gmail.com</a>&gt;<br>
Subject: Re: [Newbies] determining file size?<br>
To: <a href="mailto:beginners@lists.squeakfoundation.org">beginners@lists.squeakfoundation.org</a><br>
Cc: Van Upboy &lt;<a href="mailto:van.upboy@gmail.com">van.upboy@gmail.com</a>&gt;<br>
Message-ID: &lt;<a href="mailto:201003202111.59879.subbukk@gmail.com">201003202111.59879.subbukk@gmail.com</a>&gt;<br>
Content-Type: Text/Plain;  charset=&quot;iso-8859-15&quot;<br>
<br>
On Saturday 20 March 2010 09:02:32 pm Van Upboy wrote:<br>
&gt; I&#39;m listing files in a directory, but I want to show more than just the<br>
&gt; filename (like file size and may be creation date). I&#39;ve searched for some<br>
&gt; time on the Internet, but I can&#39;t find the answer. How to do this?<br>
File size is an attribute of the file&#39;s entry in its directory.<br>
<br>
See fileSize method in DirectoryEntry class. If you already have a file handle<br>
or a stream opened on it, use directoryEntry method. E.g.<br>
<br>
  stream directoryEntry fileSize<br>
<br>
HTH .. Subbu<br>
<br></blockquote></div><br><div style="visibility: hidden; display: inline;" id="avg_ls_inline_popup"></div><style type="text/css">#avg_ls_inline_popup {  position:absolute;  z-index:9999;  padding: 0px 0px;  margin-left: 0px;  margin-top: 0px;  width: 240px;  overflow: hidden;  word-wrap: break-word;  color: black;  font-size: 10px;  text-align: left;  line-height: 13px;}</style>