<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Tutorial 10: Using the filesystem</title>
	<atom:link href="http://www.codemii.com/2009/03/02/tutorial-10-using-the-filesystem/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.codemii.com/2009/03/02/tutorial-10-using-the-filesystem/</link>
	<description>Home of the Homebrew Browser and Wii tutorials</description>
	<lastBuildDate>Thu, 02 Feb 2012 00:41:58 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: jhb50</title>
		<link>http://www.codemii.com/2009/03/02/tutorial-10-using-the-filesystem/#comment-11981</link>
		<dc:creator>jhb50</dc:creator>
		<pubDate>Sun, 21 Aug 2011 13:01:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemii.com/?p=412#comment-11981</guid>
		<description>DIR_ITER, dir_open and dir_close no longer work after devkitpro22. See http://gbatemp.net/t301223-no-direnext for more info.</description>
		<content:encoded><![CDATA[<p>DIR_ITER, dir_open and dir_close no longer work after devkitpro22. See <a href="http://gbatemp.net/t301223-no-direnext" rel="nofollow">http://gbatemp.net/t301223-no-direnext</a> for more info.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: teknecal</title>
		<link>http://www.codemii.com/2009/03/02/tutorial-10-using-the-filesystem/#comment-11934</link>
		<dc:creator>teknecal</dc:creator>
		<pubDate>Fri, 20 May 2011 13:10:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemii.com/?p=412#comment-11934</guid>
		<description>I rarely get infuriated ;) and yes you are right about the b for binary file I didn&#039;t mention that in the tutorial, thanks.</description>
		<content:encoded><![CDATA[<p>I rarely get infuriated <img src='http://www.codemii.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  and yes you are right about the b for binary file I didn&#8217;t mention that in the tutorial, thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JwopDk</title>
		<link>http://www.codemii.com/2009/03/02/tutorial-10-using-the-filesystem/#comment-11930</link>
		<dc:creator>JwopDk</dc:creator>
		<pubDate>Fri, 20 May 2011 11:22:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemii.com/?p=412#comment-11930</guid>
		<description>teknecal: You don&#039;t need to use &quot;rb&quot; or &quot;wb&quot; in &#039;FILE *f = fopen (“sd:/test/test/myfile.txt”... &#039;, because it&#039;s not a binary file (the &#039;b&#039; in &quot;rb&quot; or &quot;wb&quot; means binary), instead you can just put &quot;r&quot; or &quot;w&quot;. While I know that right now you&#039;re probably infuriated because you already know this, this is at least a reminder because I&#039;ve noticed you don&#039;t use &quot;r&quot; or &quot;w&quot;. SORRY!</description>
		<content:encoded><![CDATA[<p>teknecal: You don&#8217;t need to use &#8220;rb&#8221; or &#8220;wb&#8221; in &#8216;FILE *f = fopen (“sd:/test/test/myfile.txt”&#8230; &#8216;, because it&#8217;s not a binary file (the &#8216;b&#8217; in &#8220;rb&#8221; or &#8220;wb&#8221; means binary), instead you can just put &#8220;r&#8221; or &#8220;w&#8221;. While I know that right now you&#8217;re probably infuriated because you already know this, this is at least a reminder because I&#8217;ve noticed you don&#8217;t use &#8220;r&#8221; or &#8220;w&#8221;. SORRY!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: teknecal</title>
		<link>http://www.codemii.com/2009/03/02/tutorial-10-using-the-filesystem/#comment-11711</link>
		<dc:creator>teknecal</dc:creator>
		<pubDate>Thu, 18 Nov 2010 09:29:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemii.com/?p=412#comment-11711</guid>
		<description>1. You shouldn&#039;t need to define any root directory after you mount the your device, once you mount the device the top level directory will become the root directory. 

If you want to change your current working directory, you use chdir(&quot;sd:/mydir&quot;); This means that now if you try to open up a file called &quot;test.txt&quot; for example, it will open up &quot;sd:/mydir/test.txt&quot;.

To change between working with SD and USB, you just open up the relevant device, e.g. fopen (&quot;sd:/myfile.txt&quot;, &quot;rb&quot;); or fopen (&quot;usb:/myfile.txt&quot;, &quot;rb&quot;);

2. Change the part in the quotation marks in fopen to sd:/test/test/myfile.txt and then we can just print the file out. 

e.g. 
FILE *f = fopen (&quot;sd:/test/test/myfile.txt&quot;, &quot;rb&quot;);
char file_line [20];
while (fgets (file_line, 20, f)) {
printf(&quot;%s\n&quot;, file_line);
}
fclose(f)</description>
		<content:encoded><![CDATA[<p>1. You shouldn&#8217;t need to define any root directory after you mount the your device, once you mount the device the top level directory will become the root directory. </p>
<p>If you want to change your current working directory, you use chdir(&#8220;sd:/mydir&#8221;); This means that now if you try to open up a file called &#8220;test.txt&#8221; for example, it will open up &#8220;sd:/mydir/test.txt&#8221;.</p>
<p>To change between working with SD and USB, you just open up the relevant device, e.g. fopen (&#8220;sd:/myfile.txt&#8221;, &#8220;rb&#8221;); or fopen (&#8220;usb:/myfile.txt&#8221;, &#8220;rb&#8221;);</p>
<p>2. Change the part in the quotation marks in fopen to sd:/test/test/myfile.txt and then we can just print the file out. </p>
<p>e.g.<br />
FILE *f = fopen (&#8220;sd:/test/test/myfile.txt&#8221;, &#8220;rb&#8221;);<br />
char file_line [20];<br />
while (fgets (file_line, 20, f)) {<br />
printf(&#8220;%s\n&#8221;, file_line);<br />
}<br />
fclose(f)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JwopDk</title>
		<link>http://www.codemii.com/2009/03/02/tutorial-10-using-the-filesystem/#comment-11706</link>
		<dc:creator>JwopDk</dc:creator>
		<pubDate>Wed, 17 Nov 2010 09:50:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemii.com/?p=412#comment-11706</guid>
		<description>Hello, I am curious about two things:
1. How do define a root directory, eg. sd:/?
2. How do you open a specific file from a specific directory? eg. test/txt/myfile.txt?
This may seem REALLY obvious, but nothing I have tried works.</description>
		<content:encoded><![CDATA[<p>Hello, I am curious about two things:<br />
1. How do define a root directory, eg. sd:/?<br />
2. How do you open a specific file from a specific directory? eg. test/txt/myfile.txt?<br />
This may seem REALLY obvious, but nothing I have tried works.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fellow programer</title>
		<link>http://www.codemii.com/2009/03/02/tutorial-10-using-the-filesystem/#comment-11617</link>
		<dc:creator>Fellow programer</dc:creator>
		<pubDate>Fri, 24 Sep 2010 05:15:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemii.com/?p=412#comment-11617</guid>
		<description>could someone make a downloadable sorse code  for this project? still haveing trouble.....</description>
		<content:encoded><![CDATA[<p>could someone make a downloadable sorse code  for this project? still haveing trouble&#8230;..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fellow programer</title>
		<link>http://www.codemii.com/2009/03/02/tutorial-10-using-the-filesystem/#comment-11421</link>
		<dc:creator>Fellow programer</dc:creator>
		<pubDate>Wed, 28 Apr 2010 03:53:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemii.com/?p=412#comment-11421</guid>
		<description>I had da same problum. this worked!!! yay i luv u!!!! 

Ps. Im only 10 :s TRUE!!!</description>
		<content:encoded><![CDATA[<p>I had da same problum. this worked!!! yay i luv u!!!! </p>
<p>Ps. Im only 10 :s TRUE!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: teknecal</title>
		<link>http://www.codemii.com/2009/03/02/tutorial-10-using-the-filesystem/#comment-11297</link>
		<dc:creator>teknecal</dc:creator>
		<pubDate>Fri, 12 Mar 2010 12:14:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemii.com/?p=412#comment-11297</guid>
		<description>I think there would be a way, you would need to look into the boot.dol loading code, LoadMii loads boot files so that should help you: http://wiibrew.org/wiki/Loadmii</description>
		<content:encoded><![CDATA[<p>I think there would be a way, you would need to look into the boot.dol loading code, LoadMii loads boot files so that should help you: <a href="http://wiibrew.org/wiki/Loadmii" rel="nofollow">http://wiibrew.org/wiki/Loadmii</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthew</title>
		<link>http://www.codemii.com/2009/03/02/tutorial-10-using-the-filesystem/#comment-11291</link>
		<dc:creator>Matthew</dc:creator>
		<pubDate>Thu, 11 Mar 2010 18:08:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemii.com/?p=412#comment-11291</guid>
		<description>I posted this comment about a month ago. Does anyone ever answer here?</description>
		<content:encoded><![CDATA[<p>I posted this comment about a month ago. Does anyone ever answer here?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthew</title>
		<link>http://www.codemii.com/2009/03/02/tutorial-10-using-the-filesystem/#comment-11178</link>
		<dc:creator>Matthew</dc:creator>
		<pubDate>Sat, 06 Feb 2010 08:44:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemii.com/?p=412#comment-11178</guid>
		<description>Hi
I&#039;m fairly new to all of this. I was wondering whether there was a way that I could code a program that would open a .dol file situated on the SD card. Basically like HBC but in my own program.
Also could you run a series of .dol files.
I.e. I run my program on the Wii, it then starts a second program situated on the SD card. Once it has completed, it runs a third program on the SD card. 
Is this possible?
Thanks</description>
		<content:encoded><![CDATA[<p>Hi<br />
I&#8217;m fairly new to all of this. I was wondering whether there was a way that I could code a program that would open a .dol file situated on the SD card. Basically like HBC but in my own program.<br />
Also could you run a series of .dol files.<br />
I.e. I run my program on the Wii, it then starts a second program situated on the SD card. Once it has completed, it runs a third program on the SD card.<br />
Is this possible?<br />
Thanks</p>
]]></content:encoded>
	</item>
</channel>
</rss>

