[Issue 20647] New: rmdirRecurse and remove cannot remove readonly files on windows
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Mar 7 19:45:44 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=20647
Issue ID: 20647
Summary: rmdirRecurse and remove cannot remove readonly files
on windows
Product: D
Version: D2
Hardware: x86
OS: Windows
Status: NEW
Severity: enhancement
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: johnnymarler at gmail.com
It would be helpful for phobos to provide a way to remove readonly files on
windows.
A common use case is when removing git repositories. On windows, git creates
readonly files inside its ".git" sub-directory. This means phobos' `remove`
and `rmdirRecurse` functions will fail when trying to delete directories that
contain git repositories.
To remove readonly files on windows, you must remove the READONLY file
attribute. I'd like to see phobos provide functionality to remove files and
directories with readonly files in them.
--
More information about the Digitalmars-d-bugs
mailing list