@@ -31,6 +31,7 @@ use crate::sys_common::{AsInner, AsInnerMut, FromInner, IntoInner};
31
31
all( target_os = "linux" , target_env = "gnu" ) ,
32
32
target_os = "macos" ,
33
33
target_os = "ios" ,
34
+ target_os = "tvos" ,
34
35
target_os = "watchos" ,
35
36
) ) ]
36
37
use crate :: sys:: weak:: syscall;
@@ -42,6 +43,7 @@ use libc::{c_int, mode_t};
42
43
#[ cfg( any(
43
44
target_os = "macos" ,
44
45
target_os = "ios" ,
46
+ target_os = "tvos" ,
45
47
target_os = "watchos" ,
46
48
all( target_os = "linux" , target_env = "gnu" )
47
49
) ) ]
@@ -495,6 +497,7 @@ impl FileAttr {
495
497
target_os = "openbsd" ,
496
498
target_os = "macos" ,
497
499
target_os = "ios" ,
500
+ target_os = "tvos" ,
498
501
target_os = "watchos" ,
499
502
) ) ]
500
503
pub fn created ( & self ) -> io:: Result < SystemTime > {
@@ -506,6 +509,7 @@ impl FileAttr {
506
509
target_os = "openbsd" ,
507
510
target_os = "macos" ,
508
511
target_os = "ios" ,
512
+ target_os = "tvos" ,
509
513
target_os = "watchos" ,
510
514
) ) ) ]
511
515
pub fn created ( & self ) -> io:: Result < SystemTime > {
@@ -851,6 +855,7 @@ impl DirEntry {
851
855
#[ cfg( any(
852
856
target_os = "macos" ,
853
857
target_os = "ios" ,
858
+ target_os = "tvos" ,
854
859
target_os = "watchos" ,
855
860
target_os = "linux" ,
856
861
target_os = "emscripten" ,
@@ -883,6 +888,7 @@ impl DirEntry {
883
888
#[ cfg( any(
884
889
target_os = "macos" ,
885
890
target_os = "ios" ,
891
+ target_os = "tvos" ,
886
892
target_os = "watchos" ,
887
893
target_os = "netbsd" ,
888
894
target_os = "openbsd" ,
@@ -901,6 +907,7 @@ impl DirEntry {
901
907
#[ cfg( not( any(
902
908
target_os = "macos" ,
903
909
target_os = "ios" ,
910
+ target_os = "tvos" ,
904
911
target_os = "watchos" ,
905
912
target_os = "netbsd" ,
906
913
target_os = "openbsd" ,
@@ -1060,11 +1067,21 @@ impl File {
1060
1067
cvt_r ( || unsafe { os_fsync ( self . as_raw_fd ( ) ) } ) ?;
1061
1068
return Ok ( ( ) ) ;
1062
1069
1063
- #[ cfg( any( target_os = "macos" , target_os = "ios" , target_os = "watchos" ) ) ]
1070
+ #[ cfg( any(
1071
+ target_os = "macos" ,
1072
+ target_os = "ios" ,
1073
+ target_os = "tvos" ,
1074
+ target_os = "watchos" ,
1075
+ ) ) ]
1064
1076
unsafe fn os_fsync ( fd : c_int ) -> c_int {
1065
1077
libc:: fcntl ( fd, libc:: F_FULLFSYNC )
1066
1078
}
1067
- #[ cfg( not( any( target_os = "macos" , target_os = "ios" , target_os = "watchos" ) ) ) ]
1079
+ #[ cfg( not( any(
1080
+ target_os = "macos" ,
1081
+ target_os = "ios" ,
1082
+ target_os = "tvos" ,
1083
+ target_os = "watchos" ,
1084
+ ) ) ) ]
1068
1085
unsafe fn os_fsync ( fd : c_int ) -> c_int {
1069
1086
libc:: fsync ( fd)
1070
1087
}
@@ -1074,7 +1091,12 @@ impl File {
1074
1091
cvt_r ( || unsafe { os_datasync ( self . as_raw_fd ( ) ) } ) ?;
1075
1092
return Ok ( ( ) ) ;
1076
1093
1077
- #[ cfg( any( target_os = "macos" , target_os = "ios" , target_os = "watchos" ) ) ]
1094
+ #[ cfg( any(
1095
+ target_os = "macos" ,
1096
+ target_os = "ios" ,
1097
+ target_os = "tvos" ,
1098
+ target_os = "watchos" ,
1099
+ ) ) ]
1078
1100
unsafe fn os_datasync ( fd : c_int ) -> c_int {
1079
1101
libc:: fcntl ( fd, libc:: F_FULLFSYNC )
1080
1102
}
@@ -1093,6 +1115,7 @@ impl File {
1093
1115
target_os = "android" ,
1094
1116
target_os = "freebsd" ,
1095
1117
target_os = "ios" ,
1118
+ target_os = "tvos" ,
1096
1119
target_os = "linux" ,
1097
1120
target_os = "macos" ,
1098
1121
target_os = "netbsd" ,
@@ -1627,6 +1650,7 @@ fn open_to_and_set_permissions(
1627
1650
target_os = "android" ,
1628
1651
target_os = "macos" ,
1629
1652
target_os = "ios" ,
1653
+ target_os = "tvos" ,
1630
1654
target_os = "watchos" ,
1631
1655
) ) ) ]
1632
1656
pub fn copy ( from : & Path , to : & Path ) -> io:: Result < u64 > {
@@ -1654,7 +1678,7 @@ pub fn copy(from: &Path, to: &Path) -> io::Result<u64> {
1654
1678
}
1655
1679
}
1656
1680
1657
- #[ cfg( any( target_os = "macos" , target_os = "ios" , target_os = "watchos" ) ) ]
1681
+ #[ cfg( any( target_os = "macos" , target_os = "ios" , target_os = "tvos" , target_os = " watchos") ) ]
1658
1682
pub fn copy ( from : & Path , to : & Path ) -> io:: Result < u64 > {
1659
1683
use crate :: sync:: atomic:: { AtomicBool , Ordering } ;
1660
1684
0 commit comments