Skip to content

Windows: add rename support - #934

Open
avsm wants to merge 1 commit into
ocaml-multicore:mainfrom
avsm:win-rename
Open

Windows: add rename support#934
avsm wants to merge 1 commit into
ocaml-multicore:mainfrom
avsm:win-rename

Conversation

@avsm

@avsm avsm commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

This is somewhat more complex than expected since Windows behaves differently for overwriting files or directories, and the more modern MoveFileEx is path based and so unsuitable for our 'at' based handle approach.

However, the lower level implementation here using the 'traditional' Win32 APIs works fine on the NTFS and FAT32 volumes I tried it on. Note that FAT just doesnt support renaming onto directories so will fail.

This let's forester cram tests get a little further! #931

This is somewhat more complex than expected since Windows behaves
differently for overwriting files or directories, and the more
modern MoveFileEx is path based and so unsuitable for our 'at'
based handle approach.

However, the lower level implementation here using the 'traditional'
Win32 APIs works fine on the NTFS and FAT32 volumes I tried it on
@avsm avsm added the windows label Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant