Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions lib/pathname.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ class Pathname # * Find *
# Iterates over the directory tree in a depth first manner, yielding a
# Pathname for each file under "this" directory.
#
# Note that you need to require 'pathname' to use this method.
#
# Returns an Enumerator if no block is given.
#
# Since it is implemented by the standard library module Find, Find.prune can
Expand All @@ -40,6 +42,8 @@ def find(ignore_error: true) # :yield: pathname
class Pathname # * FileUtils *
# Recursively deletes a directory, including all directories beneath it.
#
# Note that you need to require 'pathname' to use this method.
#
# See FileUtils.rm_rf
def rmtree(noop: nil, verbose: nil, secure: nil)
# The name "rmtree" is borrowed from File::Path of Perl.
Expand All @@ -53,6 +57,8 @@ def rmtree(noop: nil, verbose: nil, secure: nil)
class Pathname # * tmpdir *
# Creates a tmp directory and wraps the returned path in a Pathname object.
#
# Note that you need to require 'pathname' to use this method.
#
# See Dir.mktmpdir
def self.mktmpdir
require 'tmpdir' unless defined?(Dir.mktmpdir)
Expand Down