# IO vs. File

**URL:** <https://rubytalk.org/t/io-vs-file/23978>\
**Category:** ruby-talk\
**Created:** [9 January 2006 20:53 UTC](https://rubytalk.org/t/io-vs-file/23978 "2006-01-09T20:53:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Erik\_Veenstra3](https://avatars.discourse-cdn.com/v4/letter/e/f9ae1b/32.png) [@Erik\_Veenstra3](https://rubytalk.org/u/Erik_Veenstra3)\
**Post date:** [9 January 2006 20:53 UTC](https://rubytalk.org/t/io-vs-file/23978/1 "2006-01-09T20:53:01Z")

</div>

> ..., shows IO.read, yet the page on the File class does not  
> have a File.read.

File::read doesn't exist. IO::read does. But since File is a  
subclass of IO, you can do File::read, which actually is  
IO::read.

> Also, there doesn't appear a similarly simple File.write that  
> does all the dirty work for you.

True.

gegroet,  
Erik V. - [http://www.erikveen.dds.nl/](http://www.erikveen.dds.nl/)
