# File pathname.rb, line 966defchdir(&block)
warn"Pathname#chdir is obsoleted. Use Dir.chdir."Dir.chdir(@path, &block)
end

children(with_directory=true)click to toggle source

Returns the children of the directory (files and subdirectories, not
recursive) as an array of Pathname objects. By
default, the returned pathnames will have enough information to access the
files. If you set with_directory to false, then
the returned pathnames will contain the filename only.

# File pathname.rb, line 972defchrootwarn"Pathname#chroot is obsoleted. Use Dir.chroot."Dir.chroot(@path)
end

cleanpath(consider_symlink=false)click to toggle source

Returns clean pathname of self with consecutive slashes and
useless dots removed. The filesystem is not accessed.

If consider_symlink is true, then a more
conservative algorithm is used to avoid breaking symbolic linkages. This
may retain more .. entries than absolutely necessary, but
without accessing the filesystem, this can’t be avoided. See realpath.