# Newbie: where is File documented?

**URL:** <https://www.ruby-forum.com/t/newbie-where-is-file-documented/80641>\
**Category:** Ruby\
**Created:** [December 29, 2006, 4:10pm UTC](https://www.ruby-forum.com/t/newbie-where-is-file-documented/80641 "2006-12-29T16:10:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [December 29, 2006, 4:10pm UTC](https://www.ruby-forum.com/t/newbie-where-is-file-documented/80641/1 "2006-12-29T16:10:23Z")

</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:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [December 29, 2006, 4:20pm UTC](https://www.ruby-forum.com/t/newbie-where-is-file-documented/80641/2 "2006-12-29T16:20:24Z")

</div>

r wrote:

> 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 S.  
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:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [December 29, 2006, 4:24pm UTC](https://www.ruby-forum.com/t/newbie-where-is-file-documented/80641/3 "2006-12-29T16:24:25Z")

</div>

r wrote:

> It’s not in ruby-doc.

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

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [December 29, 2006, 4:26pm UTC](https://www.ruby-forum.com/t/newbie-where-is-file-documented/80641/4 "2006-12-29T16:26:28Z")

</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?  
[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)  
irb(main):001:0\> File.ancestors  
=\> [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):  
[class IO - RDoc Documentation](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:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [December 30, 2006, 2:56am UTC](https://www.ruby-forum.com/t/newbie-where-is-file-documented/80641/5 "2006-12-30T02:56:47Z")

</div>

Phrogz wrote:  
[…]

> What’s (oddly) missing from those docs is that the File class inherits  
> from the IO class (amonge others)  
> irb(main):001:0\> File.ancestors  
> =\> [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):  
> [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
