# Newbie: where is File documented?

**URL:** <https://rubytalk.org/t/newbie-where-is-file-documented/34082>\
**Category:** ruby-talk\
**Created:** [29 December 2006 15:10 UTC](https://rubytalk.org/t/newbie-where-is-file-documented/34082 "2006-12-29T15:10:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![r11](https://avatars.discourse-cdn.com/v4/letter/r/3ec8ea/32.png) [@r11](https://rubytalk.org/u/r11)\
**Post date:** [29 December 2006 15:10 UTC](https://rubytalk.org/t/newbie-where-is-file-documented/34082/1 "2006-12-29T15:10:05Z")

</div>

Hello,

I'm trying to work some examples (The Poignant Guide), I can't seem to  
find any official docs on the File class, found this half-finished  
tutorial:

[http://pleac.sourceforge.net/pleac\_ruby/fileaccess.html](http://pleac.sourceforge.net/pleac_ruby/fileaccess.html)

Is there a standard manual that would have this info?

It's not in ruby-doc.

Thanks  
-R

---

<div class="post-metadata">

**Author:** ![Wim\_Vander\_Schelden1](https://avatars.discourse-cdn.com/v4/letter/w/7cd45c/32.png) [@Wim\_Vander\_Schelden1](https://rubytalk.org/u/Wim_Vander_Schelden1)\
**Post date:** [29 December 2006 15:18 UTC](https://rubytalk.org/t/newbie-where-is-file-documented/34082/2 "2006-12-29T15:18:54Z")

</div>

r wrote:

> Hello,
> 
> I'm trying to work some examples (The Poignant Guide), I can't seem to  
> find any official docs on the File class, found this half-finished  
> tutorial:
> 
> [File Access](http://pleac.sourceforge.net/pleac_ruby/fileaccess.html)
> 
> Is there a standard manual that would have this info?
> 
> It's not in ruby-doc.
> 
> Thanks  
> -R

[http://www.ruby-doc.org/core/classes/File.html](http://www.ruby-doc.org/core/classes/File.html)

Isn't that what you were looking for?

Wim

> **···**
>
> --  
> Wim Vander Schelden  
> Bachelor Computer Science, University Ghent
> 
> [http://nanoblog.ath.cx](http://nanoblog.ath.cx)  
> My weblog, powered by Ruby and BSD licensed.

---

<div class="post-metadata">

**Author:** ![Hemant\_Kumar](https://avatars.discourse-cdn.com/v4/letter/h/46a35a/32.png) [@Hemant\_Kumar](https://rubytalk.org/u/Hemant_Kumar)\
**Post date:** [29 December 2006 15:22 UTC](https://rubytalk.org/t/newbie-where-is-file-documented/34082/3 "2006-12-29T15:22:33Z")

</div>

r wrote:

> Hello,
> 
> I'm trying to work some examples (The Poignant Guide), I can't seem to  
> find any official docs on the File class, found this half-finished  
> tutorial:
> 
> [File Access](http://pleac.sourceforge.net/pleac_ruby/fileaccess.html)
> 
> Is there a standard manual that would have this info?
> 
> It's not in ruby-doc.  
> &nbsp;&nbsp;  
> [http://www.ruby-doc.org/core/classes/File.html](http://www.ruby-doc.org/core/classes/File.html)

---

<div class="post-metadata">

**Author:** ![Gavin\_Kistner2](https://avatars.discourse-cdn.com/v4/letter/g/b9e5f3/32.png) [@Gavin\_Kistner2](https://rubytalk.org/u/Gavin_Kistner2)\
**Post date:** [29 December 2006 15:25 UTC](https://rubytalk.org/t/newbie-where-is-file-documented/34082/4 "2006-12-29T15:25:06Z")

</div>

r wrote:

> I'm trying to work some examples (The Poignant Guide), I can't seem to  
> find any official docs on the File class,

[snip]

> It's not in ruby-doc.

Er, what specifically are you looking for? Not this?  
&nbsp;&nbsp;[class File - RDoc Documentation](http://www.ruby-doc.org/core/classes/File.html)

You can see this same information if you have Ruby installed locally  
with "ri File".

What's (oddly) missing from those docs is that the File class inherits  
from the IO class (amonge others)  
&nbsp;&nbsp;irb(main):001:0\> File.ancestors  
&nbsp;&nbsp;=\> [File, IO, File::Constants, Enumerable, Object, Kernel]  
...so when you see File.open in code, you may be confused because there  
is no File.open class method documented. For those, of course, see the  
IO docs (which even mention their tight association with File):  
&nbsp;&nbsp;[http://www.ruby-doc.org/core/classes/IO.html](http://www.ruby-doc.org/core/classes/IO.html)

Or is there something else that you think is missing documentation?

---

<div class="post-metadata">

**Author:** ![r11](https://avatars.discourse-cdn.com/v4/letter/r/3ec8ea/32.png) [@r11](https://rubytalk.org/u/r11)\
**Post date:** [30 December 2006 01:55 UTC](https://rubytalk.org/t/newbie-where-is-file-documented/34082/5 "2006-12-30T01:55:07Z")

</div>

Phrogz wrote:  
[...]

> What's (oddly) missing from those docs is that the File class inherits  
> from the IO class (amonge others)  
> &nbsp;&nbsp;irb(main):001:0\> File.ancestors  
> &nbsp;&nbsp;=\> [File, IO, File::Constants, Enumerable, Object, Kernel]  
> ...so when you see File.open in code, you may be confused because there  
> is no File.open class method documented. For those, of course, see the  
> IO docs (which even mention their tight association with File):  
> &nbsp;&nbsp;[class IO - RDoc Documentation](http://www.ruby-doc.org/core/classes/IO.html)
> 
> Or is there something else that you think is missing documentation?

yeah, was looking for the read() method, it's tucked away in IO.

thanks  
-R
