Author: wayland Date: 2009-02-26 11:00:39 +0100 (Thu, 26 Feb 2009) New Revision: 25578
Modified: docs/Perl6/Spec/S29-functions.pod docs/Perl6/Spec/S32-setting-library/IO.pod Log: S29: Fix formatting IO.pod: Get rid of tree, spec stat and LinkNode a bit better Modified: docs/Perl6/Spec/S29-functions.pod =================================================================== --- docs/Perl6/Spec/S29-functions.pod 2009-02-26 09:08:17 UTC (rev 25577) +++ docs/Perl6/Spec/S29-functions.pod 2009-02-26 10:00:39 UTC (rev 25578) @@ -998,11 +998,13 @@ setservent =item Flow control + break continue redo =item Other + bless -- is this dead? caller chr Modified: docs/Perl6/Spec/S32-setting-library/IO.pod =================================================================== --- docs/Perl6/Spec/S32-setting-library/IO.pod 2009-02-26 09:08:17 UTC (rev 25577) +++ docs/Perl6/Spec/S32-setting-library/IO.pod 2009-02-26 10:00:39 UTC (rev 25578) @@ -545,15 +545,13 @@ 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 @@ -570,7 +568,7 @@ =head2 IO::FSNode -class IO::FSNode does Tree::Node { +class IO::FSNode { has Array of IO::FSNodeACL @.ACLs; has Hash of %.times; ... @@ -813,12 +811,25 @@ ... } -=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 class IO::Socket::TCP does IO::Socket does IO::Streamable { @@ -989,17 +1000,12 @@ $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 @@ -1072,6 +1078,10 @@ 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.