Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Addos.listdrives on Windows #102519

Closed
Closed
Assignees
zooba
Labels
@zooba

Description

@zooba

We don't currently have a way to get all the root directories on Windows, sinceos.listdir('/') doesn't contain everything.

I propose a very simple API:

>>> os.listdrives()["C:\\", "D:\\", ...]>>> os.listdrives(uuids=True)["\\?\Volume{4c1b02c1-d990-11dc-99ae-806e6f6e6963}\", ...]

Basically,listdrives(uuids=True) would return everything found byFindNextVolume, whilelistdrives() would applyGetVolumePathNamesForVolumeName to each GUID and return all of those. (This may return the same volume multiple times under different names, which is fine -os.stat can be used to see if they're the samest_dev.)

There's an endless amount of variations we could also apply here, but the most important functionality in my mind is to expose the OS API. App developers at least then have a starting point to do whatever they may need.

Linked PRs

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp