@@ -58,28 +58,37 @@ pub struct File {
58
58
59
59
/// Metadata information about a file.
60
60
///
61
- /// This structure is returned from the `metadata` function or method and
61
+ /// This structure is returned from the [ `metadata`] function or method and
62
62
/// represents known metadata about a file such as its permissions, size,
63
63
/// modification times, etc.
64
+ ///
65
+ /// [`metadata`]: fn.metadata.html
64
66
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
65
67
#[ derive( Clone ) ]
66
68
pub struct Metadata ( fs_imp:: FileAttr ) ;
67
69
68
70
/// Iterator over the entries in a directory.
69
71
///
70
- /// This iterator is returned from the `read_dir` function of this module and
71
- /// will yield instances of `io::Result<DirEntry>`. Through a `DirEntry`
72
+ /// This iterator is returned from the [ `read_dir`] function of this module and
73
+ /// will yield instances of `io::Result<DirEntry>`. Through a [ `DirEntry`]
72
74
/// information like the entry's path and possibly other metadata can be
73
75
/// learned.
74
76
///
77
+ /// [`read_dir`]: fn.read_dir.html
78
+ /// [`DirEntry`]: struct.DirEntry.html
79
+ ///
75
80
/// # Errors
76
81
///
77
- /// This `io::Result` will be an `Err` if there's some sort of intermittent
82
+ /// This [ `io::Result`] will be an `Err` if there's some sort of intermittent
78
83
/// IO error during iteration.
84
+ ///
85
+ /// [`io::Result`]: ../io/type.Result.html
79
86
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
80
87
pub struct ReadDir ( fs_imp:: ReadDir ) ;
81
88
82
- /// Entries returned by the `ReadDir` iterator.
89
+ /// Entries returned by the [`ReadDir`] iterator.
90
+ ///
91
+ /// [`ReadDir`]: struct.ReadDir.html
83
92
///
84
93
/// An instance of `DirEntry` represents an entry inside of a directory on the
85
94
/// filesystem. Each entry can be inspected via methods to learn about the full
@@ -89,17 +98,23 @@ pub struct DirEntry(fs_imp::DirEntry);
89
98
90
99
/// Options and flags which can be used to configure how a file is opened.
91
100
///
92
- /// This builder exposes the ability to configure how a `File` is opened and
93
- /// what operations are permitted on the open file. The `File::open` and
94
- /// `File::create` methods are aliases for commonly used options using this
101
+ /// This builder exposes the ability to configure how a [ `File`] is opened and
102
+ /// what operations are permitted on the open file. The [ `File::open`] and
103
+ /// [ `File::create`] methods are aliases for commonly used options using this
95
104
/// builder.
96
105
///
97
- /// Generally speaking, when using `OpenOptions`, you'll first call `new()`,
98
- /// then chain calls to methods to set each option, then call `open()`, passing
99
- /// the path of the file you're trying to open. This will give you a
106
+ /// [`File`]: struct.File.html
107
+ /// [`File::open`]: struct.File.html#method.open
108
+ /// [`File::create`]: struct.File.html#method.create
109
+ ///
110
+ /// Generally speaking, when using `OpenOptions`, you'll first call [`new()`],
111
+ /// then chain calls to methods to set each option, then call [`open()`],
112
+ /// passing the path of the file you're trying to open. This will give you a
100
113
/// [`io::Result`][result] with a [`File`][file] inside that you can further
101
114
/// operate on.
102
115
///
116
+ /// [`new()`]: struct.OpenOptions.html#method.new
117
+ /// [`open()`]: struct.OpenOptions.html#method.open
103
118
/// [result]: ../io/type.Result.html
104
119
/// [file]: struct.File.html
105
120
///
@@ -131,10 +146,12 @@ pub struct OpenOptions(fs_imp::OpenOptions);
131
146
132
147
/// Representation of the various permissions on a file.
133
148
///
134
- /// This module only currently provides one bit of information, `readonly`,
149
+ /// This module only currently provides one bit of information, [ `readonly`] ,
135
150
/// which is exposed on all currently supported platforms. Unix-specific
136
151
/// functionality, such as mode bits, is available through the
137
152
/// `os::unix::PermissionsExt` trait.
153
+ ///
154
+ /// [`readonly`]: struct.Permissions.html#method.readonly
138
155
#[ derive( Clone , PartialEq , Eq , Debug ) ]
139
156
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
140
157
pub struct Permissions ( fs_imp:: FilePermissions ) ;
0 commit comments