Bug #51766 [Opn->Asn]: SplFileInfo::isLink() Fails for Symlinks on windows
| From: | johannes@php.net | Date: | Fri, 06 Aug 2010 23:56:33 +0000 |
| Subject: | Bug #51766 [Opn->Asn]: SplFileInfo::isLink() Fails for Symlinks on windows | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-153197@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=51766&edit=1
ID: 51766
Updated by: johannes@php.net
Reported by: v-sumada at microsoft dot com
Summary: SplFileInfo::isLink() Fails for Symlinks on windows
-Status: Open
+Status: Assigned
Type: Bug
Package: SPL related
Operating System: All Windows OS
PHP Version: 5.3.2
-Assigned To:
+Assigned To: pajoye
Block user comment: N
New Comment:
Pierre, I think you played with symlinks on Windows before, can you add
the magic needed, here?
Previous Comments:
------------------------------------------------------------------------
[2010-05-07 19:08:08] v-sumada at microsoft dot com
Description:
------------
SplFileInfo::isLink() Which returns False for Symbolic links on all
windows OS. we have a File Symbolic link created for a file and tried
to test whether the referenced file by SplFileInfo is symbolic link or
not.
In the above script we have a symlink(filesymlink)created for a file
'testfile' and tried to check with the file_exists function for
symlink(filesymlink) which returns true and it returns false for the
SplFileInfo::isLink().
Test script:
---------------
<?php
$symlinkname = "/path/to/filesymlink";
$fileinfo = new SplFileInfo($symlinkname);
var_dump(file_exists($symlinkname));
var_dump($fileinfo->isLink());
?>
Expected result:
----------------
bool(true)
bool(true)
Actual result:
--------------
bool(true)
bool(false)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=51766&edit=1