newbie: where is File documented?

W

Wim Vander Schelden

r said:
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

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

Isn't that what you were looking for?

Wim

--
Wim Vander Schelden
Bachelor Computer Science, University Ghent

http://nanoblog.ath.cx
My weblog, powered by Ruby and BSD licensed.
 
P

Phrogz

r said:
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?
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):
http://www.ruby-doc.org/core/classes/IO.html

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

r

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):
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,585
Members
45,080
Latest member
mikkipirss

Latest Threads

Top