@@ -110,6 +110,9 @@ where
110110 /// Open a directory.
111111 ///
112112 /// You can then read the directory entries with `iterate_dir` and `open_file_in_dir`.
113+ ///
114+ /// See [`VolumeManager::open_dir`] for details, except the directory
115+ /// given is this directory.
113116 pub fn open_dir < N > (
114117 & self ,
115118 name : N ,
@@ -134,7 +137,10 @@ where
134137 Ok ( ( ) )
135138 }
136139
137- /// Look in a directory for a named file.
140+ /// Read the directory entry with the given filename from this directory, if it exists.
141+ ///
142+ /// See [`VolumeManager::find_directory_entry`] for details, except the
143+ /// directory given is this directory.
138144 pub fn find_directory_entry < N > ( & self , name : N ) -> Result < DirEntry , Error < D :: Error > >
139145 where
140146 N : ToShortFileName ,
@@ -147,13 +153,8 @@ where
147153 ///
148154 /// Long File Names will be ignored.
149155 ///
150- /// <div class="warning">
151- ///
152- /// Do not attempt to call any methods on the VolumeManager or any of its
153- /// handles from inside the callback. You will get a lock error because the
154- /// object is already locked in order to do the iteration.
155- ///
156- /// </div>
156+ /// See [`VolumeManager::iterate_dir`] for details, except the directory
157+ /// given is this directory.
157158 pub fn iterate_dir < F > ( & self , func : F ) -> Result < ( ) , Error < D :: Error > >
158159 where
159160 F : FnMut ( & DirEntry ) ,
@@ -164,18 +165,8 @@ where
164165 /// Call a callback function for each directory entry in a directory, and
165166 /// process Long File Names.
166167 ///
167- /// You must supply a [`LfnBuffer`] this API can use to temporarily hold the
168- /// Long File Name. If you pass one that isn't large enough, any Long File
169- /// Names that don't fit will be ignored and presented as if they only had a
170- /// Short File Name.
171- ///
172- /// <div class="warning">
173- ///
174- /// Do not attempt to call any methods on the VolumeManager or any of its
175- /// handles from inside the callback. You will get a lock error because the
176- /// object is already locked in order to do the iteration.
177- ///
178- /// </div>
168+ /// See [`VolumeManager::iterate_dir_lfn`] for details, except the
169+ /// directory given is this directory.
179170 pub fn iterate_dir_lfn < F > (
180171 & self ,
181172 lfn_buffer : & mut LfnBuffer < ' _ > ,
@@ -188,7 +179,10 @@ where
188179 . iterate_dir_lfn ( self . raw_directory , lfn_buffer, func)
189180 }
190181
191- /// Open a file with the given full path. A file can only be opened once.
182+ /// Open a file.
183+ ///
184+ /// See [`VolumeManager::open_file_in_dir`] for details, except the
185+ /// directory given is this directory.
192186 pub fn open_file_in_dir < N > (
193187 & self ,
194188 name : N ,
@@ -203,15 +197,22 @@ where
203197 Ok ( f. to_file ( self . volume_mgr ) )
204198 }
205199
206- /// Delete a closed file with the given filename, if it exists.
207- pub fn delete_file_in_dir < N > ( & self , name : N ) -> Result < ( ) , Error < D :: Error > >
200+ /// Delete a file/directory.
201+ ///
202+ /// See [`VolumeManager::delete_entry_in_dir`] for details, except the
203+ /// directory given is this directory.
204+ pub fn delete_entry_in_dir < N > ( & self , name : N ) -> Result < ( ) , Error < D :: Error > >
208205 where
209206 N : ToShortFileName ,
210207 {
211- self . volume_mgr . delete_file_in_dir ( self . raw_directory , name)
208+ self . volume_mgr
209+ . delete_entry_in_dir ( self . raw_directory , name)
212210 }
213211
214- /// Make a directory inside this directory
212+ /// Create a new empty directory.
213+ ///
214+ /// See [`VolumeManager::make_dir_in_dir`] for details, except the
215+ /// directory given is this directory.
215216 pub fn make_dir_in_dir < N > ( & self , name : N ) -> Result < ( ) , Error < D :: Error > >
216217 where
217218 N : ToShortFileName ,
0 commit comments