Comment #73
Dir class not defined
| Status: | Open | Start: | 12/02/2009 | |
| Priority: | Normal | Due date: | ||
| Assigned to: | - | % Done: | 0% |
|
| Category: | - | |||
| Target version: | - | |||
| Clause: | (eg. 11.1.2) |
Page and Line: | (eg. 123:45) |
|
Description
I can understand why this was left out, but I think you need it if you're going to include File. At a bare minimum, the informational methods should be present:
Dir.[]
Dir.chdir
Dir.pwd
Related issues
| related to Comment #100 | Which methods and classes should or should not be included? | Open | 12/10/2009 |
History
Updated by Shugo Maeda 271 days ago
Adam Doppelt wrote:
I can understand why this was left out, but I think you need it if you're going to include File. At a bare minimum, the informational methods should be present:
Dir.[] Dir.chdir Dir.pwd
Dir depend the underlying platform of an implementation.
We therefore would like to omit it in the first version of the specification.
Updated by Bjorn De Meyer 271 days ago
Adam, there are platforms that don't have any concept of directories, even though they do have a concept of files. You may be surprised, but ANSI C (without platform-specific extensions) is such a platform! You can work with files, but not with directories in pure ANSI C. Suppose you'd want to write an ISO ruby in pure ANSI C, then you can't use any functionality that ANSI C doesn't support. That's why we can have the File class but not the Dir class. So, all in all, I agree with Shugo.