Method: Pathname#files_r

Defined in:
lib/pleasant_path/pathname.rb

#files_rArray<Pathname>

Returns all (recursive) descendent files of the directory indicated by the Pathname. Returned Pathnames are prefixed by the original Pathname, and are in depth-first order.

Examples:

FileUtils.mkdir("parent")
FileUtils.touch("parent/file1")
FileUtils.mkdir("parent/dir1")
FileUtils.touch("parent/dir1/file1")
FileUtils.touch("parent/file2")

Pathname.new("parent").files_r
  # == [
  #      Pathname.new("parent/dir1/file1"),
  #      Pathname.new("parent/file1")
  #      Pathname.new("parent/file2")
  #    ]

Returns:



205
206
207
# File 'lib/pleasant_path/pathname.rb', line 205

def files_r
  self.find_files.to_a
end