Can't understand mount point directories on Windows
Open
Nobody has claimed this yet.
Bug
OS: Windows
Status: Needs Triage
- Dominant language
- C
- Stars
- 40.4k
- Forks
- 8.1k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 96
Description
Description
The following code:
<?php
var_dump(getcwd());
print_r(scandir("."));
Resulted in this output:
string(16) "R:\dreamflame.in"
PHP Warning: scandir(.): The system cannot find the path specifi (code: 3) in Command line code on line 2
Warning: scandir(.): The system cannot find the path specifi (code: 3) in Command line code on line 2
PHP Warning: scandir(.): Failed to open directory: No such file or directory in Command line code on line 2
Warning: scandir(.): Failed to open directory: No such file or directory in Command line code on line 2
PHP Warning: scandir(): (errno 2): No such file or directory in Command line code on line 2
Warning: scandir(): (errno 2): No such file or directory in Command line code on line 2
But I expected directory listing instead

PHP Version
PHP 8.0.12
Operating System
Windows 11 build 22000
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the provided getcwd() and scandir(".") example on Windows 11 with PHP 8.0.12, using the reported R:\dreamflame.in path. Compare the current-directory and directory-listing behavior with a normal directory; done means scandir(".") lists the expected contents without warnings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100