I see how to create a file with the attribute.
let file = OpenOptions::new()
.write(true)
.create(true)
.attributes(winapi::FILE_ATTRIBUTE_HIDDEN)
.open("foo.txt");
I also see that std::os::windows::fs::MetadataExt
will return the attribute mask.
However, I'd like to create a directory or set a directory's attribute with the hidden flag. I dug through the fs::
and Windows sources and I don't see anything.