<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>How to read a dirctory?</title>
		<link>http://www.allegro.cc/forums/view/571633</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Thu, 09 Mar 2006 01:57:40 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Is it possible to find out what files exist in a directory in C/C++?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Moving Shadow)</author>
		<pubDate>Wed, 08 Mar 2006 20:35:57 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Of course!
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Wed, 08 Mar 2006 20:37:50 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Mind giving me an example!?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Moving Shadow)</author>
		<pubDate>Wed, 08 Mar 2006 20:39:06 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Read the Allegro manual! The part about files. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p><div class="source-code snippet"><div class="inner"><pre><a href="http://www.allegro.cc/manual/al_findfirst" target="_blank"><span class="a">al_findfirst</span></a>
<a href="http://www.allegro.cc/manual/al_findnext" target="_blank"><span class="a">al_findnext</span></a>
<a href="http://www.allegro.cc/manual/al_findclose" target="_blank"><span class="a">al_findclose</span></a>
</pre></div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (miran)</author>
		<pubDate>Wed, 08 Mar 2006 20:51:53 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p><a href="http://www.delorie.com/djgpp/doc/libc-2.02/libc_289.html">findfirst/findnext</a></p><p>For example if you want to print the nhame of every file in a directory:</p><div class="source-code snippet"><div class="inner"><pre><span class="k1">struct</span> ffblk f<span class="k2">;</span>
<span class="k1">int</span> done <span class="k3">=</span> <a href="http://www.delorie.com/djgpp/doc/libc/libc_326.html" target="_blank">findfirst</a><span class="k2">(</span><span class="s">"*.*"</span>, <span class="k3">&amp;</span>f, FA_HIDDEN <span class="k3">|</span> FA_SYSTEM<span class="k2">)</span><span class="k2">;</span>
<span class="k1">while</span> <span class="k2">(</span><span class="k3">!</span>done<span class="k2">)</span>
<span class="k2">{</span>
  <a href="http://www.delorie.com/djgpp/doc/libc/libc_624.html" target="_blank">printf</a><span class="k2">(</span><span class="s">"%s\n"</span>, f.ff_name<span class="k2">)</span><span class="k2">;</span>
  done <span class="k3">=</span> <a href="http://www.delorie.com/djgpp/doc/libc/libc_327.html" target="_blank">findnext</a><span class="k2">(</span><span class="k3">&amp;</span>f<span class="k2">)</span><span class="k2">;</span>
<span class="k2">}</span>
</pre></div></div><p>

[edit]
</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Read the Allegro manual! The part about files. </p><p>al_findfirst<br />al_findnext<br />al_findclose
</p></div></div><p>

He did say C/C++, not C/C++ and Allegro. <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (LennyLen)</author>
		<pubDate>Wed, 08 Mar 2006 20:54:14 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Excellent, excellent.....now.....how would I copy and paste a file, given the file name?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Moving Shadow)</author>
		<pubDate>Wed, 08 Mar 2006 22:35:20 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>copy filename destination
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (A J)</author>
		<pubDate>Wed, 08 Mar 2006 22:58:11 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>When not using allegro, I prefer:
</p><div class="source-code snippet"><div class="inner"><pre><a href="http://www.delorie.com/djgpp/doc/libc/libc_602.html" target="_blank">opendir</a>
<a href="http://www.delorie.com/djgpp/doc/libc/libc_646.html" target="_blank">readdir</a>
<a href="http://www.delorie.com/djgpp/doc/libc/libc_106.html" target="_blank">closedir</a>
</pre></div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Wed, 08 Mar 2006 23:25:38 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>And under windows, FindFirst/FindNext or something with those substrings.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Wed, 08 Mar 2006 23:38:02 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I will print out this thread;D
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Murat AYIK)</author>
		<pubDate>Thu, 09 Mar 2006 01:57:40 +0000</pubDate>
	</item>
</rss>
