@@ -9,9 +9,7 @@ use crate::sys;
9
9
use crate :: sys:: platform:: fs:: MetadataExt as UnixMetadataExt ;
10
10
use crate :: sys_common:: { AsInner , AsInnerMut , FromInner } ;
11
11
12
- /// Unix-specific extensions to [`File`].
13
- ///
14
- /// [`File`]: ../../../../std/fs/struct.File.html
12
+ /// Unix-specific extensions to [`fs::File`].
15
13
#[ stable( feature = "file_offset" , since = "1.15.0" ) ]
16
14
pub trait FileExt {
17
15
/// Reads a number of bytes starting from a given offset.
@@ -55,19 +53,18 @@ pub trait FileExt {
55
53
///
56
54
/// The current file cursor is not affected by this function.
57
55
///
58
- /// Similar to [`Read::read_exact`] but uses [`read_at`] instead of `read`.
56
+ /// Similar to [`io:: Read::read_exact`] but uses [`read_at`] instead of `read`.
59
57
///
60
- /// [`Read::read_exact`]: ../../../../std/io/trait.Read.html#method.read_exact
61
- /// [`read_at`]: #tymethod.read_at
58
+ /// [`read_at`]: FileExt::read_at
62
59
///
63
60
/// # Errors
64
61
///
65
62
/// If this function encounters an error of the kind
66
- /// [`ErrorKind::Interrupted`] then the error is ignored and the operation
63
+ /// [`io:: ErrorKind::Interrupted`] then the error is ignored and the operation
67
64
/// will continue.
68
65
///
69
66
/// If this function encounters an "end of file" before completely filling
70
- /// the buffer, it returns an error of the kind [`ErrorKind::UnexpectedEof`].
67
+ /// the buffer, it returns an error of the kind [`io:: ErrorKind::UnexpectedEof`].
71
68
/// The contents of `buf` are unspecified in this case.
72
69
///
73
70
/// If any other read error is encountered then this function immediately
@@ -77,9 +74,6 @@ pub trait FileExt {
77
74
/// has read, but it will never read more than would be necessary to
78
75
/// completely fill the buffer.
79
76
///
80
- /// [`ErrorKind::Interrupted`]: ../../../../std/io/enum.ErrorKind.html#variant.Interrupted
81
- /// [`ErrorKind::UnexpectedEof`]: ../../../../std/io/enum.ErrorKind.html#variant.UnexpectedEof
82
- ///
83
77
/// # Examples
84
78
///
85
79
/// ```no_run
@@ -161,19 +155,18 @@ pub trait FileExt {
161
155
/// The current file cursor is not affected by this function.
162
156
///
163
157
/// This method will continuously call [`write_at`] until there is no more data
164
- /// to be written or an error of non-[`ErrorKind::Interrupted`] kind is
158
+ /// to be written or an error of non-[`io:: ErrorKind::Interrupted`] kind is
165
159
/// returned. This method will not return until the entire buffer has been
166
160
/// successfully written or such an error occurs. The first error that is
167
- /// not of [`ErrorKind::Interrupted`] kind generated from this method will be
161
+ /// not of [`io:: ErrorKind::Interrupted`] kind generated from this method will be
168
162
/// returned.
169
163
///
170
164
/// # Errors
171
165
///
172
166
/// This function will return the first error of
173
- /// non-[`ErrorKind::Interrupted`] kind that [`write_at`] returns.
167
+ /// non-[`io:: ErrorKind::Interrupted`] kind that [`write_at`] returns.
174
168
///
175
- /// [`ErrorKind::Interrupted`]: ../../../../std/io/enum.ErrorKind.html#variant.Interrupted
176
- /// [`write_at`]: #tymethod.write_at
169
+ /// [`write_at`]: FileExt::write_at
177
170
///
178
171
/// # Examples
179
172
///
@@ -223,8 +216,6 @@ impl FileExt for fs::File {
223
216
}
224
217
225
218
/// Unix-specific extensions to [`fs::Permissions`].
226
- ///
227
- /// [`fs::Permissions`]: ../../../../std/fs/struct.Permissions.html
228
219
#[ stable( feature = "fs_ext" , since = "1.1.0" ) ]
229
220
pub trait PermissionsExt {
230
221
/// Returns the underlying raw `st_mode` bits that contain the standard
@@ -302,8 +293,6 @@ impl PermissionsExt for Permissions {
302
293
}
303
294
304
295
/// Unix-specific extensions to [`fs::OpenOptions`].
305
- ///
306
- /// [`fs::OpenOptions`]: ../../../../std/fs/struct.OpenOptions.html
307
296
#[ stable( feature = "fs_ext" , since = "1.1.0" ) ]
308
297
pub trait OpenOptionsExt {
309
298
/// Sets the mode bits that a new file will be created with.
@@ -372,8 +361,6 @@ impl OpenOptionsExt for OpenOptions {
372
361
}
373
362
374
363
/// Unix-specific extensions to [`fs::Metadata`].
375
- ///
376
- /// [`fs::Metadata`]: ../../../../std/fs/struct.Metadata.html
377
364
#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
378
365
pub trait MetadataExt {
379
366
/// Returns the ID of the device containing the file.
@@ -535,7 +522,7 @@ pub trait MetadataExt {
535
522
fn atime ( & self ) -> i64 ;
536
523
/// Returns the last access time of the file, in nanoseconds since [`atime`].
537
524
///
538
- /// [`atime`]: #tymethod. atime
525
+ /// [`atime`]: MetadataExt:: atime
539
526
///
540
527
/// # Examples
541
528
///
@@ -571,7 +558,7 @@ pub trait MetadataExt {
571
558
fn mtime ( & self ) -> i64 ;
572
559
/// Returns the last modification time of the file, in nanoseconds since [`mtime`].
573
560
///
574
- /// [`mtime`]: #tymethod. mtime
561
+ /// [`mtime`]: MetadataExt:: mtime
575
562
///
576
563
/// # Examples
577
564
///
@@ -607,7 +594,7 @@ pub trait MetadataExt {
607
594
fn ctime ( & self ) -> i64 ;
608
595
/// Returns the last status change time of the file, in nanoseconds since [`ctime`].
609
596
///
610
- /// [`ctime`]: #tymethod. ctime
597
+ /// [`ctime`]: MetadataExt:: ctime
611
598
///
612
599
/// # Examples
613
600
///
@@ -714,12 +701,10 @@ impl MetadataExt for fs::Metadata {
714
701
}
715
702
}
716
703
717
- /// Unix-specific extensions for [`FileType`].
704
+ /// Unix-specific extensions for [`fs:: FileType`].
718
705
///
719
706
/// Adds support for special Unix file types such as block/character devices,
720
707
/// pipes, and sockets.
721
- ///
722
- /// [`FileType`]: ../../../../std/fs/struct.FileType.html
723
708
#[ stable( feature = "file_type_ext" , since = "1.5.0" ) ]
724
709
pub trait FileTypeExt {
725
710
/// Returns `true` if this file type is a block device.
@@ -813,8 +798,6 @@ impl FileTypeExt for fs::FileType {
813
798
}
814
799
815
800
/// Unix-specific extension methods for [`fs::DirEntry`].
816
- ///
817
- /// [`fs::DirEntry`]: ../../../../std/fs/struct.DirEntry.html
818
801
#[ stable( feature = "dir_entry_ext" , since = "1.1.0" ) ]
819
802
pub trait DirEntryExt {
820
803
/// Returns the underlying `d_ino` field in the contained `dirent`
@@ -875,8 +858,6 @@ pub fn symlink<P: AsRef<Path>, Q: AsRef<Path>>(src: P, dst: Q) -> io::Result<()>
875
858
}
876
859
877
860
/// Unix-specific extensions to [`fs::DirBuilder`].
878
- ///
879
- /// [`fs::DirBuilder`]: ../../../../std/fs/struct.DirBuilder.html
880
861
#[ stable( feature = "dir_builder" , since = "1.6.0" ) ]
881
862
pub trait DirBuilderExt {
882
863
/// Sets the mode to create new directories with. This option defaults to
0 commit comments