#50526 [Opn]: stat() needs Context parameter

From: Date: Mon, 21 Dec 2009 22:37:11 +0000
Subject: #50526 [Opn]: stat() needs Context parameter
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-146037@lists.php.net to get a copy of this message
 ID:               50526
 Updated by:       lbarnaud@php.net
-Summary:          stream_stat needs Context
 Reported By:      codeslinger at compsalot dot com
 Status:           Open
 Bug Type:         Feature/Change Request
 Operating System: any
 PHP Version:      5.2.12
 New Comment:

For stream_wrappers, by calling fopen() with a context parameter and
then fstat() on the opened stream, you should be able to pass a context
(the ->context attribute in the wrapper's instance).


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

[2009-12-18 21:36:59] codeslinger at compsalot dot com

Description:
------------
Feature Request:

the stream wrapper functions are *totally awesome*  :-)  !!!

but the "stat" family of functions is limited by the lack of a
"context" param.

For instance I need to be able to provide a user name and password for
a particular connection.  for opendir mkdir fopen etc.  I am able to
pass a context with that info and everything works.  But then when I try
to do a "stat" or "fstat"  it fails because there is no way to pass the
$context.

Thank you for making PHP such a fantastic programming language!


Reproduce code:
---------------
---
From manual page: streamwrapper.stream-stat#Description
---


Actual result:
--------------
also see related 
Bug #42965  	copy() should support context parameters for URLs




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


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



Thread (6 messages)

« previous php.bugs (#146037) next »