For Programmers: Free Programming Magazines  


Home > Archive > PHP Documentation > June 2007 > #41798 [Opn]: stat() gives -1 for value of [blocks] on windows for a valid input file









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author #41798 [Opn]: stat() gives -1 for value of [blocks] on windows for a valid input file
tony2001@php.net

2007-06-25, 7:05 pm

ID: 41798
Updated by: tony2001@php.net
Reported By: nikhil dot gupta at in dot ibm dot com
Status: Open
-Bug Type: Filesystem function related
+Bug Type: Documentation problem
Operating System: Windows
PHP Version: 5CVS-2007-06-25 (snap)
New Comment:

Reclassified as docu issue.


Previous Comments:
------------------------------------------------------------------------

[2007-06-25 11:15:46] nikhil dot gupta at in dot ibm dot com

Description:
------------
Using stat() function on a valid file on Windows operating system ,
gives -1 for [blocks] member of the array returned by stat() function.
On linux it outputs proper value.

In the documentation, it is mentioned that [rdev] and [blksize] members
of the array returned by stat() function will output -1 on Windows
operating function. I doubt, whether same will be applicable for
[blocks] also?

If yes, then documentation might need the change.

Reproduce code:
---------------
<?php
$stat_array = stat(__FILE__);
var_dump( $stat_array[12] );
var_dump( $stat_array['blocks'] );
?>

Expected result:
----------------
int(%d)
int(%d)

Actual result:
--------------
int(-1)
int(-1)


------------------------------------------------------------------------


--
Edit this bug report at http://bugs.php.net/?id=41798&edit=1
Girls

2007-06-26, 2:44 am

Shania Twain kneels for doggy XXXX.!

http://www.eyrenet.com/watch?id=726648
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com