cvs: phpdoc /en/reference/spl/splfileinfo getlinktarget.xml

From: Date: Sat, 15 Nov 2008 01:02:20 +0000
Subject: cvs: phpdoc /en/reference/spl/splfileinfo getlinktarget.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-2548@lists.php.net to get a copy of this message
saltybeagle Sat Nov 15 01:02:20 2008 UTC Modified files: /phpdoc/en/reference/spl/splfileinfo getlinktarget.xml Log: Document SplFileInfo::getLinkTarget http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/spl/splfileinfo/getlinktarget.xml?r1=1.1&r2=1.2&diff_format=u Index: phpdoc/en/reference/spl/splfileinfo/getlinktarget.xml diff -u phpdoc/en/reference/spl/splfileinfo/getlinktarget.xml:1.1 phpdoc/en/reference/spl/splfileinfo/getlinktarget.xml:1.2 --- phpdoc/en/reference/spl/splfileinfo/getlinktarget.xml:1.1 Fri Nov 14 18:38:21 2008 +++ phpdoc/en/reference/spl/splfileinfo/getlinktarget.xml Sat Nov 15 01:02:20 2008 @@ -1,21 +1,27 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <refentry xml:id="splfileinfo.getlinktarget" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <refnamediv> <refname>SplFileInfo::getLinkTarget</refname> - <refpurpose>The getLinkTarget purpose</refpurpose> + <refpurpose>Get the target of a link</refpurpose> </refnamediv> <refsect1 role="description"> &reftitle.description; <methodsynopsis> - <modifier>public</modifier> <type>void</type><methodname>SplFileInfo::getLinkTarget</methodname> + <modifier>public</modifier> <type>string</type><methodname>SplFileInfo::getLinkTarget</methodname> <void /> </methodsynopsis> <para> - The method description goes here. + Get the target of a filesystem link. </para> + <note> + <para> + The target may not be the real path on the filesystem. Use <methodname>SplFileInfo::getRealPath</methodname> + to determine the true path on the filesystem. + </para> + </note> </refsect1> <refsect1 role="parameters"> @@ -26,7 +32,14 @@ <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> - Description... + Returns the target of the filesystem link. + </para> + </refsect1> + + <refsect1 role="errors"> + &reftitle.errors; + <para> + Throws RuntimeException on error. </para> </refsect1> @@ -38,14 +51,19 @@ <programlisting role="php"> <![CDATA[ <?php -/* ... */ +$info = new SplFileInfo('/Users/bbieber/workspace'); +if ($info->isLink()) { + var_dump($info->getLinkTarget()); + var_dump($info->getRealPath()); +} ?> ]]> </programlisting> &example.outputs.similar; <screen> <![CDATA[ -... +string(19) "Documents/workspace" +string(34) "/Users/bbieber/Documents/workspace" ]]> </screen> </example> @@ -56,7 +74,8 @@ &reftitle.seealso; <para> <simplelist> - <member><methodname>Classname::Method</methodname></member> + <member><methodname>SplFileInfo::isLink</methodname></member> + <member><methodname>SplFileInfo::getRealPath</methodname></member> </simplelist> </para> </refsect1>

« previous php.doc.cvs (#2548) next »