Skip to content

Commit

Permalink
S29: Fix formatting
Browse files Browse the repository at this point in the history
IO.pod: Get rid of tree, spec stat and LinkNode a bit better


git-svn-id: http://svn.pugscode.org/pugs@25578 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information
wayland committed Feb 26, 2009
1 parent bba26cb commit 6cac900
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 14 deletions.
2 changes: 2 additions & 0 deletions S29-functions.pod
Original file line number Diff line number Diff line change
Expand Up @@ -998,11 +998,13 @@ setpwent
setservent

=item Flow control

break
continue
redo

=item Other

bless -- is this dead?
caller
chr
Expand Down
38 changes: 24 additions & 14 deletions S32-setting-library/IO.pod
Original file line number Diff line number Diff line change
Expand Up @@ -545,15 +545,13 @@ Available only as a handle method.

This represents the filesystem.

class IO::FileSystem does IO::Streamable does Tree {
class IO::FileSystem does IO::Streamable {
has Str $.fstype; # ext3, ntfs, vfat, reiserfs, etc
has Str $.illegal_chars; # ie. /\x0
has Int $.max_path;
...
}

It inherits $cwn and $root from Tree.

=over 4

=item glob
Expand All @@ -570,7 +568,7 @@ Returns FSNode objects

=head2 IO::FSNode

class IO::FSNode does Tree::Node {
class IO::FSNode {
has Array of IO::FSNodeACL @.ACLs;
has Hash of %.times;
...
Expand Down Expand Up @@ -813,11 +811,24 @@ sets C<$!> (errno). If FILENAME is omitted, uses C<$_>.
...
}

=item link
=item new

=item readlink
Creates a new link in the filesystem.

=item symlink
IO::LinkNode.new(
Name => '/home/wayland/symlink.txt'
Target => '/home/wayland/realfile.txt',
Type => 'Hard', # Default is Symbolic
);

Reads in the previously created symlink.

$link = IO::LinkNode.new(
Name => '/home/wayland/symlink.txt',
);
print $link.target; # prints /home/wayland/realfile.txt

Neither of these is "use portable" compatible.

=head2 IO::Socket::TCP

Expand Down Expand Up @@ -989,17 +1000,12 @@ successfully changed.
$mode = '0o644'; chmod $mode, 'foo'; # this is better
$mode = 0o644; chmod $mode, 'foo'; # this is best

=item lstat

Returns a stat buffer. If the lstat succeeds, the stat buffer evaluates
to true, and additional file tests may be performed on the value. If
the stat fails, all subsequent tests on the stat buffer also evaluate
to false.

=item stat

=item IO.stat

$node.stat(Type => 'Link'); # Type => Link does an lstat instead

Returns a stat buffer. If the lstat succeeds, the stat buffer evaluates
to true, and additional file tests may be performed on the value. If
the stat fails, all subsequent tests on the stat buffer also evaluate
Expand Down Expand Up @@ -1072,6 +1078,10 @@ Gone, see IO::Endable

See IO::FileDescriptor

=item lstat

Use stat() with the Type => 'Link' option.

=item IO.name

Changed to .path(), but we haven't gotten around to specifying this on all of them.
Expand Down

0 comments on commit 6cac900

Please sign in to comment.