public Method

FileUtils.remove_entry(path, force = false)

This method removes a file system entry path. path might be a regular file, a directory, or something. If path is a directory, remove it recursively.

See also #remove_entry_secure.

Source Code

# File fileutils.rb, line 753
def remove_entry(path, force = false)
  Entry_.new(path).postorder_traverse do |ent|
    begin
      ent.remove
    rescue
      raise unless force
    end
  end
rescue
  raise unless force
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.