@@ -199,6 +199,7 @@ pub trait CapStdExtDirExt {
199
199
/// ```
200
200
///
201
201
/// Any existing file will be replaced.
202
+ #[ cfg( not( windows) ) ]
202
203
fn atomic_replace_with < F , T , E > (
203
204
& self ,
204
205
destname : impl AsRef < Path > ,
@@ -209,9 +210,11 @@ pub trait CapStdExtDirExt {
209
210
E : From < std:: io:: Error > ;
210
211
211
212
/// Atomically write the provided contents to a file.
213
+ #[ cfg( not( windows) ) ]
212
214
fn atomic_write ( & self , destname : impl AsRef < Path > , contents : impl AsRef < [ u8 ] > ) -> Result < ( ) > ;
213
215
214
216
/// Atomically write the provided contents to a file, using specified permissions.
217
+ #[ cfg( not( windows) ) ]
215
218
fn atomic_write_with_perms (
216
219
& self ,
217
220
destname : impl AsRef < Path > ,
@@ -716,6 +719,7 @@ impl CapStdExtDirExt for Dir {
716
719
Ok ( ( ) )
717
720
}
718
721
722
+ #[ cfg( not( windows) ) ]
719
723
fn atomic_replace_with < F , T , E > (
720
724
& self ,
721
725
destname : impl AsRef < Path > ,
@@ -753,10 +757,12 @@ impl CapStdExtDirExt for Dir {
753
757
Ok ( r)
754
758
}
755
759
760
+ #[ cfg( not( windows) ) ]
756
761
fn atomic_write ( & self , destname : impl AsRef < Path > , contents : impl AsRef < [ u8 ] > ) -> Result < ( ) > {
757
762
self . atomic_replace_with ( destname, |f| f. write_all ( contents. as_ref ( ) ) )
758
763
}
759
764
765
+ #[ cfg( not( windows) ) ]
760
766
fn atomic_write_with_perms (
761
767
& self ,
762
768
destname : impl AsRef < Path > ,
0 commit comments