Skip to content

Commit 177a86d

Browse files
committed
Update the Pathname class documentation with the one in the C extension
1 parent 643585a commit 177a86d

1 file changed

Lines changed: 17 additions & 12 deletions

File tree

lib/pathname.rb

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,24 +31,25 @@ module ::Kernel
3131
require 'pathname.so'
3232

3333
#
34-
# == Pathname
34+
# Pathname represents the name of a file or directory on the filesystem,
35+
# but not the file itself.
3536
#
36-
# Pathname represents a pathname which locates a file in a filesystem.
37-
# The pathname depends on OS: Unix, Windows, etc.
38-
# Pathname library works with pathnames of local OS.
39-
# However non-Unix pathnames are supported experimentally.
37+
# The pathname depends on the Operating System: Unix, Windows, etc.
38+
# This library works with pathnames of local OS, however non-Unix pathnames
39+
# are supported experimentally.
4040
#
41-
# It does not represent the file itself.
4241
# A Pathname can be relative or absolute. It's not until you try to
4342
# reference the file that it even matters whether the file exists or not.
4443
#
4544
# Pathname is immutable. It has no method for destructive update.
4645
#
47-
# The value of this class is to manipulate file path information in a neater
46+
# The goal of this class is to manipulate file path information in a neater
4847
# way than standard Ruby provides. The examples below demonstrate the
49-
# difference. *All* functionality from File, FileTest, and some from Dir and
50-
# FileUtils is included, in an unsurprising way. It is essentially a facade for
51-
# all of these, and more.
48+
# difference.
49+
#
50+
# *All* functionality from File, FileTest, and some from Dir and FileUtils is
51+
# included, in an unsurprising way. It is essentially a facade for all of
52+
# these, and more.
5253
#
5354
# == Examples
5455
#
@@ -96,8 +97,8 @@ module ::Kernel
9697
# === Core methods
9798
#
9899
# These methods are effectively manipulating a String, because that's
99-
# all a path is. Except for #mountpoint?, #children, #each_child,
100-
# #realdirpath and #realpath, they don't access the filesystem.
100+
# all a path is. None of these access the file system except for
101+
# #mountpoint?, #children, #each_child, #realdirpath and #realpath.
101102
#
102103
# - +
103104
# - #join
@@ -146,6 +147,7 @@ module ::Kernel
146147
#
147148
# These methods are a facade for File:
148149
# - #atime
150+
# - #birthtime
149151
# - #ctime
150152
# - #mtime
151153
# - #chmod(mode)
@@ -164,6 +166,7 @@ module ::Kernel
164166
# - #make_symlink(old)
165167
# - #truncate(length)
166168
# - #utime(atime, mtime)
169+
# - #lutime(atime, mtime)
167170
# - #basename(*args)
168171
# - #dirname
169172
# - #extname
@@ -189,6 +192,8 @@ module ::Kernel
189192
# - #binread(*args)
190193
# - #readlines(*args)
191194
# - #sysopen(*args)
195+
# - #write(*args)
196+
# - #binwrite(*args)
192197
#
193198
# === Utilities
194199
#

0 commit comments

Comments
 (0)