use std::{io, path::Path};
use super::sealed::Sealed;
use crate::unblock;
#[doc(no_inline)]
pub use std::os::windows::fs::MetadataExt;
pub async fn symlink_dir<P, Q>(src: P, dst: Q) -> io::Result<()>
where
P: AsRef<Path>,
Q: AsRef<Path>,
{
let src = src.as_ref().to_owned();
let dst = dst.as_ref().to_owned();
unblock(move || std::os::windows::fs::symlink_dir(src, dst)).await
}
pub async fn symlink_file<P, Q>(src: P, dst: Q) -> io::Result<()>
where
P: AsRef<Path>,
Q: AsRef<Path>,
{
let src = src.as_ref().to_owned();
let dst = dst.as_ref().to_owned();
unblock(move || std::os::windows::fs::symlink_file(src, dst)).await
}
pub trait OpenOptionsExt: Sealed {
fn access_mode(&mut self, access: u32) -> &mut Self;
fn share_mode(&mut self, share: u32) -> &mut Self;
fn custom_flags(&mut self, flags: u32) -> &mut Self;
fn attributes(&mut self, attributes: u32) -> &mut Self;
fn security_qos_flags(&mut self, flags: u32) -> &mut Self;
}