From: zverok.offline@... Date: 2019-10-12T09:48:22+00:00 Subject: [ruby-core:95306] [Ruby master Feature#16249] Dir#empty? and File#empty? Issue #16249 has been reported by zverok (Victor Shepelev). ---------------------------------------- Feature #16249: Dir#empty? and File#empty? https://bugs.ruby-lang.org/issues/16249 * Author: zverok (Victor Shepelev) * Status: Open * Priority: Normal * Assignee: * Target version: ---------------------------------------- I don't think it is a super-valuable addition (as nobody complained about it, or I can't find similar proposals), but seems logical to me: ```ruby # Existed since 2.4 Dir.empty?('dirname') #=> true/false File.empty?('filename') # => true/false # Proposed and implemented: Dir.open('dirname').empty? File.open('filename').empty? ``` ---Files-------------------------------- file_dir_i_empty.patch (3.27 KB) -- https://bugs.ruby-lang.org/ Unsubscribe: