<?xml version="1.0"?>
<?xml-stylesheet
href="http://www.w3.org/2000/08/w3c-synd/style.css" type="text/css"
?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel rdf:about="http://pear.php.net/bugs/search.php">
    <title>PEAR Bug Search Results</title>
    <link>http://pear.php.net/bugs/search.php?cmd=display&amp;package_name%5B0%5D=File</link>
    <description>Search Results</description>
    <dc:language>en-us</dc:language>
    <dc:creator>pear-webmaster@lists.php.net</dc:creator>
    <dc:publisher>pear-webmaster@lists.php.net</dc:publisher>
    <admin:generatorAgent rdf:resource="http://pear.php.net/bugs"/>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
    <items>
     <rdf:Seq>
      <rdf:li rdf:resource="http://pear.php.net/bug/16425" />
      <rdf:li rdf:resource="http://pear.php.net/bug/12741" />
      <rdf:li rdf:resource="http://pear.php.net/bug/2798" />

     </rdf:Seq>
    </items>
  </channel>

  <image rdf:about="http://pear.php.net/gifs/pearsmall.gif">
    <title>PEAR Bugs</title>
    <url>http://pear.php.net/gifs/pearsmall.gif</url>
    <link>http://pear.php.net/bugs</link>
  </image>

    <item rdf:about="http://pear.php.net/bug/16425">
      <title>File: Bug 16425 [Open] File_Util::isAbsolute</title>
      <link>http://pear.php.net/bugs/16425</link>
      <content:encoded><![CDATA[<pre>File Bug
Reported by felixsigl
2009-07-10T13:31:58+00:00
PHP: 5.2.5 OS: Windows Package Version: 1.3.0

Description:
------------
On Windows (Testsystem is XAMPP) it is possible to use eg. '/Programme/xampp/htdocs/' for all file operations (dont ask me why). but File_Util::isAbsolute reports that the path is relative.

Test script:
---------------
require_once ('File/Util.php');

$filename = '/Programme/xampp/htdocs/';

if (File_Util::isAbsolute($filename)) {
	echo &quot;'$filename' is absolute.&quot;;
} else {
	echo &quot;'$filename' is relative.&quot;;
} 

Expected result:
----------------
'/Programme/xampp/htdocs/' is absolute.

Actual result:
--------------
'/Programme/xampp/htdocs/' is relative.</pre>]]></content:encoded>
      <description><![CDATA[<pre>File Bug
Reported by felixsigl
2009-07-10T13:31:58+00:00
PHP: 5.2.5 OS: Windows Package Version: 1.3.0

Description:
------------
On Windows (Testsystem is XAMPP) it is possible to use eg. '/Programme/xampp/htdocs/' for all file operations (dont ask me why). but File_Util::isAbsolute reports that the path is relative.

Test script:
---------------
require_once ('File/Util.php');

$filename = '/Programme/xampp/htdocs/';

if (File_Util::isAbsolute($filename)) {
	echo &quot;'$filename' is absolute.&quot;;
} else {
	echo &quot;'$filename' is relative.&quot;;
} 

Expected result:
----------------
'/Programme/xampp/htdocs/' is absolute.

Actual result:
--------------
'/Programme/xampp/htdocs/' is relative.</pre>]]></description>
      <dc:date>2009-07-10T13:31:58+00:00</dc:date>
      <dc:creator>felixsigl &amp;#x61;&amp;#116; gmail &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>File Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/12741">
      <title>File: Bug 12741 [Verified] Failed to test on Linux and FreeBSD</title>
      <link>http://pear.php.net/bugs/12741</link>
      <content:encoded><![CDATA[<pre>File Bug
Reported by inomata
2007-12-20T22:52:11+00:00
PHP: 5.2.5 OS: FreeBSD Package Version: CVS

Description:
------------
tests/FileTest.php fails on some tests.

TestCase FileTest-&gt;testrelativePath() failed: expected D:\Data, actual ..\..\D:\Data in /tmp/File-1.3.0/tests/FileTest.php:206
TestCase FileTest-&gt;testrealpath() failed: expected /a/weird/path/is, actual /a\weird/path\is in /tmp/File-1.3.0/tests/FileTest.php:218
TestCase FileTest-&gt;testrealpath() failed: expected /a/weird/path/is/that, actual /a\weird/path\is/that in /tmp/File-1.3.0/tests/FileTest.php:219


Other tests are succeeded.


Test script:
---------------
$ php tests/FileTest.php


Actual result:
--------------
TestCase FileTest-&gt;testlocking() passed
TestCase FileTest-&gt;testclose() passed
TestCase FileTest-&gt;testreadAll() passed
TestCase FileTest-&gt;testread() passed
TestCase FileTest-&gt;testwrite() passed
TestCase FileTest-&gt;testreadChar() passed
TestCase FileTest-&gt;testwriteChar() passed
TestCase FileTest-&gt;testreadLine() passed
TestCase FileTest-&gt;testwriteLine() passed
TestCase FileTest-&gt;testrewind() passed
TestCase FileTest-&gt;testbuildPath() passed
TestCase FileTest-&gt;testskipRoot() passed
TestCase FileTest-&gt;testgetTempDir() passed
TestCase FileTest-&gt;testgetTempFile() passed
TestCase FileTest-&gt;testisAbsolute() passed
TestCase FileTest-&gt;testrelativePath() failed: expected D:\Data, actual ..\..\D:\Data in /tmp/File-1.3.0/tests/FileTest.php:206
TestCase FileTest-&gt;testrealpath() failed: expected /a/weird/path/is, actual /a\weird/path\is in /tmp/File-1.3.0/tests/FileTest.php:218
TestCase FileTest-&gt;testrealpath() failed: expected /a/weird/path/is/that, actual /a\weird/path\is/that in /tmp/File-1.3.0/tests/FileTest.php:219</pre>]]></content:encoded>
      <description><![CDATA[<pre>File Bug
Reported by inomata
2007-12-20T22:52:11+00:00
PHP: 5.2.5 OS: FreeBSD Package Version: CVS

Description:
------------
tests/FileTest.php fails on some tests.

TestCase FileTest-&gt;testrelativePath() failed: expected D:\Data, actual ..\..\D:\Data in /tmp/File-1.3.0/tests/FileTest.php:206
TestCase FileTest-&gt;testrealpath() failed: expected /a/weird/path/is, actual /a\weird/path\is in /tmp/File-1.3.0/tests/FileTest.php:218
TestCase FileTest-&gt;testrealpath() failed: expected /a/weird/path/is/that, actual /a\weird/path\is/that in /tmp/File-1.3.0/tests/FileTest.php:219


Other tests are succeeded.


Test script:
---------------
$ php tests/FileTest.php


Actual result:
--------------
TestCase FileTest-&gt;testlocking() passed
TestCase FileTest-&gt;testclose() passed
TestCase FileTest-&gt;testreadAll() passed
TestCase FileTest-&gt;testread() passed
TestCase FileTest-&gt;testwrite() passed
TestCase FileTest-&gt;testreadChar() passed
TestCase FileTest-&gt;testwriteChar() passed
TestCase FileTest-&gt;testreadLine() passed
TestCase FileTest-&gt;testwriteLine() passed
TestCase FileTest-&gt;testrewind() passed
TestCase FileTest-&gt;testbuildPath() passed
TestCase FileTest-&gt;testskipRoot() passed
TestCase FileTest-&gt;testgetTempDir() passed
TestCase FileTest-&gt;testgetTempFile() passed
TestCase FileTest-&gt;testisAbsolute() passed
TestCase FileTest-&gt;testrelativePath() failed: expected D:\Data, actual ..\..\D:\Data in /tmp/File-1.3.0/tests/FileTest.php:206
TestCase FileTest-&gt;testrealpath() failed: expected /a/weird/path/is, actual /a\weird/path\is in /tmp/File-1.3.0/tests/FileTest.php:218
TestCase FileTest-&gt;testrealpath() failed: expected /a/weird/path/is/that, actual /a\weird/path\is/that in /tmp/File-1.3.0/tests/FileTest.php:219</pre>]]></description>
      <dc:date>2008-11-01T05:31:47+00:00</dc:date>
      <dc:creator>inomata &amp;#x61;&amp;#116; ecoop &amp;#x64;&amp;#111;&amp;#x74; net</dc:creator>
      <dc:subject>File Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/2798">
      <title>File: Feature/Change Request 2798 [Open] function for human readable filesize conversion</title>
      <link>http://pear.php.net/bugs/2798</link>
      <content:encoded><![CDATA[<pre>File Feature/Change Request
Reported by cweiske
2004-11-19T15:13:55+00:00
PHP: - OS: - Package Version: 

Description:
------------
While programming a file browser, I came to the problem of displaying the filesize in a human-readable format.

There are numerous 20-liners out there which do the thing, but not in PEAR.

To my mind, the File package would be the right place for such a function.
Could you include the function in the package?

Reproduce code:
---------------
    /**
    *   returns the filesize using a prefix
    *   like &quot;kilo&quot;, &quot;mebi&quot; or &quot;giga&quot;
    *   @author Christian Weiske &lt;cweiske@cweiske.de&gt;
    *
    *   @param  int     The size to convert
    *   @param  int     The number of decimals to use
    *   @param  boolean Use long names (kilobyte) instead of short ones (kB)
    *   @param  boolean If the old style should be used
    *   @param  boolean If the &quot;BiBytes&quot; names should be used [applies only to !$bOldStyle]
    *
    *   @return string  The filesize in human readable format
    */
    function prefixed($nSize, $nDecimals = 1, $bLong = false, $bOldStyle = true, $bUseBiBytes = true)
    {
        $nBase   = ($bOldStyle || $bUseBiBytes) ? 1024 : 1000;
        $arNames = array('', 'kilo', 'mega', 'giga', 'tera', 'peta', 'exa', 'zetta', 'yotta');
        $nMax    = count($arNames) - 1;
        
        for ($nA = 0; $nSize &gt;= $nBase &amp;&amp; $nA &lt; $nMax; $nA++) {
            $nSize /= $nBase;
        }
        
        $strName = ($bOldStyle || !$bUseBiBytes) ? $arNames[$nA] : substr($arNames[$nA],0,2) . 'bi';
        if (!$bLong) {
            $strName = $bOldStyle || !$bUseBiBytes ? substr($strName, 0, 1) : substr($strName, 0, 2);
            $strName .= 'B';
            $strName = $nA &gt;= 2 ? strtoupper($strName) : $strName;
        } else {
            $strName .= $nSize == 1 ? 'byte' : 'bytes';
        }
        
        return round($nSize,$nDecimals) . ' ' . $strName;
    }</pre>]]></content:encoded>
      <description><![CDATA[<pre>File Feature/Change Request
Reported by cweiske
2004-11-19T15:13:55+00:00
PHP: - OS: - Package Version: 

Description:
------------
While programming a file browser, I came to the problem of displaying the filesize in a human-readable format.

There are numerous 20-liners out there which do the thing, but not in PEAR.

To my mind, the File package would be the right place for such a function.
Could you include the function in the package?

Reproduce code:
---------------
    /**
    *   returns the filesize using a prefix
    *   like &quot;kilo&quot;, &quot;mebi&quot; or &quot;giga&quot;
    *   @author Christian Weiske &lt;cweiske@cweiske.de&gt;
    *
    *   @param  int     The size to convert
    *   @param  int     The number of decimals to use
    *   @param  boolean Use long names (kilobyte) instead of short ones (kB)
    *   @param  boolean If the old style should be used
    *   @param  boolean If the &quot;BiBytes&quot; names should be used [applies only to !$bOldStyle]
    *
    *   @return string  The filesize in human readable format
    */
    function prefixed($nSize, $nDecimals = 1, $bLong = false, $bOldStyle = true, $bUseBiBytes = true)
    {
        $nBase   = ($bOldStyle || $bUseBiBytes) ? 1024 : 1000;
        $arNames = array('', 'kilo', 'mega', 'giga', 'tera', 'peta', 'exa', 'zetta', 'yotta');
        $nMax    = count($arNames) - 1;
        
        for ($nA = 0; $nSize &gt;= $nBase &amp;&amp; $nA &lt; $nMax; $nA++) {
            $nSize /= $nBase;
        }
        
        $strName = ($bOldStyle || !$bUseBiBytes) ? $arNames[$nA] : substr($arNames[$nA],0,2) . 'bi';
        if (!$bLong) {
            $strName = $bOldStyle || !$bUseBiBytes ? substr($strName, 0, 1) : substr($strName, 0, 2);
            $strName .= 'B';
            $strName = $nA &gt;= 2 ? strtoupper($strName) : $strName;
        } else {
            $strName .= $nSize == 1 ? 'byte' : 'bytes';
        }
        
        return round($nSize,$nDecimals) . ' ' . $strName;
    }</pre>]]></description>
      <dc:date>2007-03-16T12:46:01+00:00</dc:date>
      <dc:creator>cweiske &amp;#x61;&amp;#116; php &amp;#x64;&amp;#111;&amp;#x74; net</dc:creator>
      <dc:subject>File Feature/Change Request</dc:subject>
    </item>
</rdf:RDF>
