ID:               26051
 Updated by:       [EMAIL PROTECTED]
 Reported By:      six at t0x dot net
-Status:           Open
+Status:           Bogus
 Bug Type:         Filesystem function related
 Operating System: win2k
 PHP Version:      4.3.4RC3
 New Comment:

filetype() does work just fine on windows. 
If windows returns 'wrong' types, it's not bug in PHP..



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

[2003-10-31 09:27:18] six at t0x dot net

There are specific win32 API calls (GetFileType comes to my mind) to
get this kind of information.

I don't think this should be classified as "Bogus" because this is a
very confusing behavior, at least, if you don't plan to fix the bug,
the documentation should be updated to clearly state that filetype()
does not work on Win32.

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

[2003-10-31 08:38:17] [EMAIL PROTECTED]

PHP returns whatever the libc stat() function returns for the filetype.
No bug.


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

[2003-10-31 06:06:43] six at t0x dot net

Description:
------------
As the subject states, filetype() on windows (w2k at least) returns
wrong type for device drivers. Actually, it seems to always return the
type "file".



Reproduce code:
---------------
<?

// Of course this works with any device name with any extension

echo "type : ".filetype("c:\com1.xxx");

?>

Expected result:
----------------
type : char

Actual result:
--------------
type : file


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


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

Reply via email to