Skip to content

Commit fb25fa4

Browse files
committed
Remove IO::Dir and IO::File, too unwieldy to implement for too little gain
1 parent fe96bcf commit fb25fa4

File tree

1 file changed

+15
-30
lines changed

1 file changed

+15
-30
lines changed

S32-setting-library/IO.pod

Lines changed: 15 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ DRAFT: Synopsis 32: Setting Library - IO
2323

2424
Created: 19 Feb 2009 extracted from S29-functions.pod; added stuff from S16-IO later
2525

26-
Last Modified: 28 March 2013
27-
Version: 17
26+
Last Modified: 17 April 2013
27+
Version: 18
2828

2929
The document is a draft.
3030

@@ -43,8 +43,7 @@ methods on file handles.
4343
File handles are of type C<IO::Handle>, and can be created with C<&open>.
4444
Paths are generally passed as strings or C<IO::Path> objects.
4545

46-
C<&dir> returns C<IO::File> and C<IO::Dir> objects, which are
47-
subclasses of C<IO::Path>.
46+
C<&dir> returns C<IO::Path> objects.
4847

4948

5049
default handle
@@ -97,9 +96,9 @@ and the parent directory are excluded, which can be controlled with the
9796
C<$test> named parameter. Only items that smart-match against this test are
9897
returned.
9998

100-
The return value is a list of C<IO::File> and C<IO::Dir> objects. Because of
101-
this, you may want use the C<basename> method on the results to get the just
102-
the file name, without its full path.
99+
The return value is a list of C<IO::Path> objects. Because of this, you may
100+
want use the C<basename> method on the results to get the just the file name,
101+
without its full path.
103102

104103
=item note
105104

@@ -353,11 +352,11 @@ Closes the handle. Fails on error.
353352

354353
Provides ways to inspect a file or path without opening it.
355354

356-
If you apply that role to a class, that class must provide a C<path>
357-
method which C<IO::FileTests>' method will call to obtain the path to
358-
test. This C<path> method must return a C<Str:D>.
355+
If you apply that role to a class, that class must provide a C<Str> method
356+
which returns the full path. C<IO::FileTests> will call this method
357+
to obtain the path to test. Stringification must return C<Str:D> here.
359358

360-
The methods are typically only one letter long (for now; perl 5 tradition
359+
The methods are typically only one letter long (for now; Perl 5 tradition
361360
strikes) and are summarized in the following table:
362361

363362
M Test performed
@@ -391,7 +390,7 @@ TODO: methods created, accessed, modified
391390

392391
=head2 IO::Path
393392

394-
class IO::Path is Cool does IO::FileTest { }
393+
class IO::Path is Cool does IO::FileTestable { }
395394

396395
Holds a path of a file or directory. The path is generally divided
397396
into three parts, the I<volume>, I<directory> and I<base name>.
@@ -440,9 +439,9 @@ current and the parent directory are excluded, which can be controlled with
440439
the C<$test> named parameter. Only items that smart-match against this test
441440
are returned.
442441

443-
The return value is a list of C<IO::File> and C<IO::Dir> objects. Because of
444-
this, you may want use the C<basename> method on the results to get the just
445-
the file name, without its full path.
442+
The return value is a list of C<IO::Path> objects. Because of this, you may
443+
want use the C<basename> method on the results to get the just the file name,
444+
without its full path.
446445

447446
=item is-relative
448447

@@ -474,20 +473,6 @@ already relative are returned unchanged.
474473

475474
=back
476475

477-
=head2 IO::File
478-
479-
class IO::File is IO::Path { ... }
480-
481-
Represents a path that is known to be a plain file (not a directory), at
482-
least at the time when the object was created.
483-
484-
=head2 IO::Dir
485-
486-
class IO::Dir is IO::Path { ... }
487-
488-
Represents a path that is known to be a directory, at
489-
least at the time when the object was created.
490-
491476
=head1 Here Be Dragons
492477

493478
Everything below this point hasn't been reviewed properly
@@ -1019,7 +1004,7 @@ passed in. Here are some example mappings:
10191004

10201005
URI type IO type
10211006
======== =======
1022-
file: IO::File or IO::Directory
1007+
file: IO::Path
10231008
ftp: IO::Socket::INET (data channel)
10241009
http: IO::Socket::INET
10251010

0 commit comments

Comments
 (0)