This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ThatXliner
Recipients ThatXliner, steven.daprano
Date 2020-11-29.21:46:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1606686364.4.0.743817463192.issue42497@roundup.psfhosted.org>
In-reply-to
Content
Ok, so I just made a patch implementing this using os.access. It adds the following methods to pathlib.Path

 - can_read    = Returns True if the user can read the path
 - can_write   = Returns True if the user can write on the path
 - can_execute = Returns True if the user can execute the path

These are implemented via

 - return os.access(str(self), os.R_OK)
 - return os.access(str(self), os.W_OK)
 - return os.access(str(self), os.X_OK)

respectively.
History
Date User Action Args
2020-11-29 21:46:04ThatXlinersetrecipients: + ThatXliner, steven.daprano
2020-11-29 21:46:04ThatXlinersetmessageid: <1606686364.4.0.743817463192.issue42497@roundup.psfhosted.org>
2020-11-29 21:46:04ThatXlinerlinkissue42497 messages
2020-11-29 21:46:04ThatXlinercreate