@@ -18,7 +18,9 @@ use path::Path;
18
18
use sys;
19
19
use sys_common:: { FromInner , AsInner , AsInnerMut } ;
20
20
21
- /// Redox-specific extensions to `Permissions`
21
+ /// Redox-specific extensions to [`fs::Permissions`].
22
+ ///
23
+ /// [`fs::Permissions`]: ../../../../std/fs/struct.Permissions.html
22
24
#[ stable( feature = "fs_ext" , since = "1.1.0" ) ]
23
25
pub trait PermissionsExt {
24
26
/// Returns the underlying raw `mode_t` bits that are the standard Redox
@@ -95,7 +97,9 @@ impl PermissionsExt for Permissions {
95
97
}
96
98
}
97
99
98
- /// Redox-specific extensions to `OpenOptions`
100
+ /// Redox-specific extensions to [`fs::OpenOptions`].
101
+ ///
102
+ /// [`fs::OpenOptions`]: ../../../../std/fs/struct.OpenOptions.html
99
103
#[ stable( feature = "fs_ext" , since = "1.1.0" ) ]
100
104
pub trait OpenOptionsExt {
101
105
/// Sets the mode bits that a new file will be created with.
@@ -163,13 +167,9 @@ impl OpenOptionsExt for OpenOptions {
163
167
}
164
168
}
165
169
166
- // Hm, why are there casts here to the returned type, shouldn't the types always
167
- // be the same? Right you are! Turns out, however, on android at least the types
168
- // in the raw `stat` structure are not the same as the types being returned. Who
169
- // knew!
170
- //
171
- // As a result to make sure this compiles for all platforms we do the manual
172
- // casts and rely on manual lowering to `stat` if the raw type is desired.
170
+ /// Redox-specific extensions to [`fs::Metadata`].
171
+ ///
172
+ /// [`fs::Metadata`]: ../../../../std/fs/struct.Metadata.html
173
173
#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
174
174
pub trait MetadataExt {
175
175
#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
@@ -204,6 +204,13 @@ pub trait MetadataExt {
204
204
fn blocks ( & self ) -> u64 ;
205
205
}
206
206
207
+ // Hm, why are there casts here to the returned type, shouldn't the types always
208
+ // be the same? Right you are! Turns out, however, on android at least the types
209
+ // in the raw `stat` structure are not the same as the types being returned. Who
210
+ // knew!
211
+ //
212
+ // As a result to make sure this compiles for all platforms we do the manual
213
+ // casts and rely on manual lowering to `stat` if the raw type is desired.
207
214
#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
208
215
impl MetadataExt for fs:: Metadata {
209
216
fn dev ( & self ) -> u64 {
@@ -253,7 +260,12 @@ impl MetadataExt for fs::Metadata {
253
260
}
254
261
}
255
262
256
- /// Add special Redox types (block/char device, fifo and socket)
263
+ /// Redox-specific extensions for [`FileType`].
264
+ ///
265
+ /// Adds support for special Unix file types such as block/character devices,
266
+ /// pipes, and sockets.
267
+ ///
268
+ /// [`FileType`]: ../../../../std/fs/struct.FileType.html
257
269
#[ stable( feature = "file_type_ext" , since = "1.5.0" ) ]
258
270
pub trait FileTypeExt {
259
271
/// Returns whether this file type is a block device.
@@ -307,8 +319,10 @@ pub fn symlink<P: AsRef<Path>, Q: AsRef<Path>>(src: P, dst: Q) -> io::Result<()>
307
319
sys:: fs:: symlink ( src. as_ref ( ) , dst. as_ref ( ) )
308
320
}
309
321
322
+ /// Redox-specific extensions to [`fs::DirBuilder`].
323
+ ///
324
+ /// [`fs::DirBuilder`]: ../../../../std/fs/struct.DirBuilder.html
310
325
#[ stable( feature = "dir_builder" , since = "1.6.0" ) ]
311
- /// An extension trait for `fs::DirBuilder` for Redox-specific options.
312
326
pub trait DirBuilderExt {
313
327
/// Sets the mode to create new directories with. This option defaults to
314
328
/// 0o777.
0 commit comments