Recreate hidden file on Windows

So, afaik (as far as I have tested) Windows won’t let you CreateFile a file that already exists and has the HIDDEN attribute, unless you specify the HIDDEN attribute when calling CreateFile.

Naturally, in Go there is no such technique with os.Create afaik, so ad-hoc I implemented it like unhide(filename), create(filename), hide(filename).

But… that’s an incomplete solution since the file now can shortly pop up in Explorer of course, so for the CreateFile way I would need to mix Go library things with win32 things.

Anyone have an idea?
Thank you :slight_smile: