Issue #13789 has been updated by matz (Yukihiro Matsumoto).

Status changed from Open to Rejected

Rejected. You can simply filter Dir entries. If you have concrete use-case of the method, reopen the issue, please.

Matz.


----------------------------------------
Feature #13789: Dir - methods
https://bugs.ruby-lang.org/issues/13789#change-66395

* Author: opti (Andreas Opti)
* Status: Rejected
* Priority: Normal
* Assignee: 
* Target version: 
----------------------------------------
If having (new) Dir.entries, Dir.chidren, I would also add:
Dir.entries (includes all),
Dir.files Dir.dirs Dir.symlinks Dir.pipes (Dir.something_more?)

Dir.file?(filename); Dir.symlink[s]?(*symlinks), etc  # give one or more names
To be discussed if more names are useful, perhaps using Dir.file_s_, Dir.pipe_s_
=> return count of given files, that are of that type.

Also (a new) Dir.cd 
should return nil (no exception), if cd isn't sucessful, else the new path.

thanks
Opti




-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>