Commit 50ab23d
committed
Auto merge of #25844 - alexcrichton:stabilize-fs-features, r=aturon
This commit stabilizes the following APIs, slating them all to be cherry-picked
into the 1.1 release.
* fs::FileType (and transitively the derived trait implementations)
* fs::Metadata::file_type
* fs::FileType::is_dir
* fs::FileType::is_file
* fs::FileType::is_symlink
* fs::DirEntry::metadata
* fs::DirEntry::file_type
* fs::DirEntry::file_name
* fs::set_permissions
* fs::symlink_metadata
* os::raw::{self, *}
* os::{android, bitrig, linux, ...}::raw::{self, *}
* os::{android, bitrig, linux, ...}::fs::MetadataExt
* os::{android, bitrig, linux, ...}::fs::MetadataExt::as_raw_stat
* os::unix::fs::PermissionsExt
* os::unix::fs::PermissionsExt::mode
* os::unix::fs::PermissionsExt::set_mode
* os::unix::fs::PermissionsExt::from_mode
* os::unix::fs::OpenOptionsExt
* os::unix::fs::OpenOptionsExt::mode
* os::unix::fs::DirEntryExt
* os::unix::fs::DirEntryExt::ino
* os::windows::fs::MetadataExt
* os::windows::fs::MetadataExt::file_attributes
* os::windows::fs::MetadataExt::creation_time
* os::windows::fs::MetadataExt::last_access_time
* os::windows::fs::MetadataExt::last_write_time
* os::windows::fs::MetadataExt::file_size
The `os::unix::fs::Metadata` structure was also removed entirely, moving all of
its associated methods into the `os::unix::fs::MetadataExt` trait instead. The
methods are all marked as `#[stable]` still.
As some minor cleanup, some deprecated and unstable fs apis were also removed:
* File::path
* Metadata::accessed
* Metadata::modified
Features that were explicitly left unstable include:
* fs::WalkDir - the semantics of this were not considered in the recent fs
expansion RFC.
* fs::DirBuilder - it's still not 100% clear if the naming is right here and if
the set of functionality exposed is appropriate.
* fs::canonicalize - the implementation on Windows here is specifically in
question as it always returns a verbatim path. Additionally the Unix
implementation is susceptible to buffer overflows on long paths unfortunately.
* fs::PathExt - as this is just a convenience trait, it is not stabilized at
this time.
* fs::set_file_times - this funciton is still waiting on a time abstraction.File tree
27 files changed
+672
-257
lines changed- src
- librustc_trans
- libstd
- os
- android
- bitrig
- dragonfly
- freebsd
- ios
- linux
- macos
- nacl
- openbsd
- sys
- unix
- ext
- windows/ext
27 files changed
+672
-257
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
1 | 19 | | |
2 | 20 | | |
3 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | 41 | | |
43 | 42 | | |
44 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
| 151 | + | |
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | 211 | | |
220 | 212 | | |
221 | 213 | | |
| |||
501 | 493 | | |
502 | 494 | | |
503 | 495 | | |
504 | | - | |
| 496 | + | |
505 | 497 | | |
506 | 498 | | |
507 | 499 | | |
| |||
575 | 567 | | |
576 | 568 | | |
577 | 569 | | |
578 | | - | |
579 | | - | |
580 | | - | |
581 | | - | |
582 | | - | |
583 | | - | |
584 | | - | |
585 | | - | |
586 | | - | |
587 | | - | |
588 | | - | |
589 | | - | |
590 | | - | |
591 | | - | |
592 | | - | |
593 | | - | |
594 | | - | |
595 | | - | |
596 | | - | |
597 | | - | |
598 | | - | |
599 | | - | |
600 | | - | |
601 | | - | |
602 | | - | |
603 | | - | |
604 | | - | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | | - | |
609 | | - | |
610 | 570 | | |
611 | 571 | | |
612 | 572 | | |
| |||
663 | 623 | | |
664 | 624 | | |
665 | 625 | | |
666 | | - | |
667 | 626 | | |
668 | 627 | | |
| 628 | + | |
669 | 629 | | |
670 | 630 | | |
671 | 631 | | |
| 632 | + | |
672 | 633 | | |
673 | 634 | | |
674 | 635 | | |
| 636 | + | |
675 | 637 | | |
676 | 638 | | |
677 | 639 | | |
| |||
736 | 698 | | |
737 | 699 | | |
738 | 700 | | |
739 | | - | |
| 701 | + | |
740 | 702 | | |
741 | 703 | | |
742 | 704 | | |
| |||
751 | 713 | | |
752 | 714 | | |
753 | 715 | | |
754 | | - | |
| 716 | + | |
755 | 717 | | |
756 | 718 | | |
757 | 719 | | |
758 | 720 | | |
759 | 721 | | |
760 | 722 | | |
761 | | - | |
| 723 | + | |
762 | 724 | | |
763 | 725 | | |
764 | 726 | | |
| |||
828 | 790 | | |
829 | 791 | | |
830 | 792 | | |
831 | | - | |
832 | 793 | | |
833 | 794 | | |
834 | 795 | | |
| |||
837 | 798 | | |
838 | 799 | | |
839 | 800 | | |
840 | | - | |
| 801 | + | |
841 | 802 | | |
842 | 803 | | |
843 | 804 | | |
| |||
1270 | 1231 | | |
1271 | 1232 | | |
1272 | 1233 | | |
1273 | | - | |
1274 | 1234 | | |
1275 | 1235 | | |
1276 | 1236 | | |
| |||
1286 | 1246 | | |
1287 | 1247 | | |
1288 | 1248 | | |
1289 | | - | |
1290 | | - | |
1291 | | - | |
1292 | | - | |
1293 | | - | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
1294 | 1252 | | |
1295 | 1253 | | |
1296 | 1254 | | |
| 1255 | + | |
1297 | 1256 | | |
1298 | 1257 | | |
1299 | 1258 | | |
| |||
2066 | 2025 | | |
2067 | 2026 | | |
2068 | 2027 | | |
2069 | | - | |
2070 | | - | |
2071 | | - | |
| 2028 | + | |
| 2029 | + | |
| 2030 | + | |
| 2031 | + | |
| 2032 | + | |
| 2033 | + | |
| 2034 | + | |
| 2035 | + | |
| 2036 | + | |
| 2037 | + | |
| 2038 | + | |
| 2039 | + | |
| 2040 | + | |
| 2041 | + | |
| 2042 | + | |
| 2043 | + | |
| 2044 | + | |
| 2045 | + | |
2072 | 2046 | | |
2073 | 2047 | | |
2074 | 2048 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| |||
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
| 23 | + | |
21 | 24 | | |
| 25 | + | |
22 | 26 | | |
23 | 27 | | |
| 28 | + | |
24 | 29 | | |
| 30 | + | |
25 | 31 | | |
| 32 | + | |
26 | 33 | | |
| 34 | + | |
27 | 35 | | |
| 36 | + | |
28 | 37 | | |
| 38 | + | |
29 | 39 | | |
30 | 40 | | |
31 | 41 | | |
| 42 | + | |
32 | 43 | | |
| 44 | + | |
33 | 45 | | |
| 46 | + | |
34 | 47 | | |
| 48 | + | |
35 | 49 | | |
| 50 | + | |
36 | 51 | | |
| 52 | + | |
37 | 53 | | |
| 54 | + | |
38 | 55 | | |
| 56 | + | |
39 | 57 | | |
| 58 | + | |
40 | 59 | | |
| 60 | + | |
41 | 61 | | |
| 62 | + | |
42 | 63 | | |
| 64 | + | |
43 | 65 | | |
| 66 | + | |
44 | 67 | | |
| 68 | + | |
45 | 69 | | |
| 70 | + | |
46 | 71 | | |
| 72 | + | |
47 | 73 | | |
| 74 | + | |
48 | 75 | | |
| 76 | + | |
49 | 77 | | |
| 78 | + | |
50 | 79 | | |
| 80 | + | |
51 | 81 | | |
52 | 82 | | |
53 | 83 | | |
| |||
59 | 89 | | |
60 | 90 | | |
61 | 91 | | |
| 92 | + | |
62 | 93 | | |
| 94 | + | |
63 | 95 | | |
64 | 96 | | |
| 97 | + | |
65 | 98 | | |
| 99 | + | |
66 | 100 | | |
| 101 | + | |
67 | 102 | | |
| 103 | + | |
68 | 104 | | |
| 105 | + | |
69 | 106 | | |
| 107 | + | |
70 | 108 | | |
71 | 109 | | |
72 | 110 | | |
| 111 | + | |
73 | 112 | | |
| 113 | + | |
74 | 114 | | |
| 115 | + | |
75 | 116 | | |
| 117 | + | |
76 | 118 | | |
| 119 | + | |
77 | 120 | | |
| 121 | + | |
78 | 122 | | |
| 123 | + | |
79 | 124 | | |
| 125 | + | |
80 | 126 | | |
| 127 | + | |
81 | 128 | | |
| 129 | + | |
82 | 130 | | |
| 131 | + | |
83 | 132 | | |
| 133 | + | |
84 | 134 | | |
| 135 | + | |
85 | 136 | | |
| 137 | + | |
86 | 138 | | |
| 139 | + | |
87 | 140 | | |
| 141 | + | |
88 | 142 | | |
| 143 | + | |
89 | 144 | | |
| 145 | + | |
90 | 146 | | |
| 147 | + | |
91 | 148 | | |
| 149 | + | |
92 | 150 | | |
93 | 151 | | |
94 | | - | |
95 | 152 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
0 commit comments