<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Sean&#039;s Blog &#187; io</title>
	<atom:link href="http://seanbehan.com/tag/io/feed/" rel="self" type="application/rss+xml" />
	<link>http://seanbehan.com</link>
	<description>Web Programming, Ruby on Rails, Wordpress, PHP from Burlington, Vermont</description>
	<lastBuildDate>Wed, 18 Jan 2012 21:44:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Reading, Writing, Removing Files and Directories in Ruby</title>
		<link>http://seanbehan.com/ruby/reading-writing-removing-files-and-directories-in-ruby/</link>
		<comments>http://seanbehan.com/ruby/reading-writing-removing-files-and-directories-in-ruby/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 22:34:45 +0000</pubDate>
		<dc:creator>bseanvt</dc:creator>
				<category><![CDATA[ruby]]></category>
		<category><![CDATA[directories]]></category>
		<category><![CDATA[files]]></category>
		<category><![CDATA[io]]></category>
		<category><![CDATA[reading]]></category>
		<category><![CDATA[writing]]></category>

		<guid isPermaLink="false">http://seanbehan.com/?p=625</guid>
		<description><![CDATA[These aren&#8217;t all of them, but I think they are some of the most useful. # making a directory in another directory that doesn't yet exist... FileUtils.mkdir_p '/path/to/your/directory/that/doesnt/exist/yet' # recursively remove a directory and the contents FileUtils.rm_rf(&#34;/path/to/directory/you/want/to/delete&#34;) # write a file from the contents of another file... File.open(&#34;/path/to/the/file.ext&#34;, &#34;wb&#34;) {&#124;f&#124; f.write(@your_other_file.read)}]]></description>
			<content:encoded><![CDATA[<div style="height:33px;" class="really_simple_share robots-nocontent snap_nopreview"><div class="really_simple_share_facebook_like" style="width:px;">
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fseanbehan.com%2Fruby%2Freading-writing-removing-files-and-directories-in-ruby%2F&amp;layout=button_count&amp;show_faces=false&amp;width=&amp;action=like&amp;colorscheme=light&amp;send=false&amp;height=27" 
						scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:px; height:27px;" allowTransparency="true"></iframe>
				</div><div class="really_simple_share_twitter" style="width:px;">
					<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
						data-text="Reading, Writing, Removing Files and Directories in Ruby" data-url="http://seanbehan.com/ruby/reading-writing-removing-files-and-directories-in-ruby/" 
						data-via="" ></a> 
				</div></div>
		<div style="clear:both;"></div><p>These aren&#8217;t all of them, but I think they are some of the most useful.</p>
<pre class="wp-code-highlight prettyprint">
# making a directory in another directory that doesn't yet exist...
FileUtils.mkdir_p '/path/to/your/directory/that/doesnt/exist/yet'

# recursively remove a directory and the contents
FileUtils.rm_rf(&quot;/path/to/directory/you/want/to/delete&quot;)

# write a file from the contents of another file...
File.open(&quot;/path/to/the/file.ext&quot;, &quot;wb&quot;) {|f| f.write(@your_other_file.read)}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://seanbehan.com/ruby/reading-writing-removing-files-and-directories-in-ruby/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

