Python workarounds for MO2's Universal Virtual Filesystem (UVFS) on Windows 11 24H2
Project description
mo2-vfs.py
Python workarounds for MO2's Universal Virtual Filesystem (UVFS) on Windows 11 24H2.
Replaces broken stdlib functions (Path.is_file, Path.is_dir, os.makedirs,
glob.glob) with direct Win32 API calls via ctypes. No external dependencies.
See ModOrganizer2/modorganizer#2174 for background.
Installation
pip install mo2-vfs.py
Usage
import mo2_vfs
# Apply monkey-patches to os.makedirs and Path.is_file
mo2_vfs.patch_all()
# Direct API
mo2_vfs.is_file(path)
mo2_vfs.is_dir(path)
mo2_vfs.mkdir(path) # creates parent dirs automatically
mo2_vfs.glob(path, "*.swf", recursive=True)
# Restore originals
mo2_vfs.unpatch_all()
What is fixed
| Broken stdlib API | Replacement | Win32 API used |
|---|---|---|
Path.is_file() |
mo2_uvfs.is_file() |
GetFileAttributesW |
Path.is_dir() |
mo2_uvfs.is_dir() |
GetFileAttributesW |
os.makedirs() / Path.mkdir() |
mo2_uvfs.mkdir() |
CreateDirectoryW |
glob.glob() / Path.glob() |
mo2_uvfs.glob() |
FindFirstFileW / FindNextFileW |
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mo2_vfs_py-1.0.0.tar.gz.
File metadata
- Download URL: mo2_vfs_py-1.0.0.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6114fdb9429683087dc8d86c21ca2aa82b875c89fcd99213360a05f8bf6a0004
|
|
| MD5 |
4e95b20ab5ce1063215c94489c381655
|
|
| BLAKE2b-256 |
41655303c215eeb540959638cc3e793d554e49ac1d75d8cc3f2c7ee7db91601e
|
File details
Details for the file mo2_vfs_py-1.0.0-py3-none-any.whl.
File metadata
- Download URL: mo2_vfs_py-1.0.0-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d404328117c932683630bb6ceff9e06924b2d7101cf7a63d9b51198e4cc577c
|
|
| MD5 |
c43def3fbd4005a931e950386fd36421
|
|
| BLAKE2b-256 |
b99aa1ec7be1257a1ae6eaf081d0e7ab2f06e75c49db8387ba2a8135c55d88c0
|