We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 69e1754 commit edba471Copy full SHA for edba471
1 file changed
src/filesystem/directory.rs
@@ -153,6 +153,15 @@ where
153
.find_directory_entry(self.raw_directory, name)
154
}
155
156
+ /// Check whether a directory entry exists.
157
+ pub fn directory_entry_exists<N: ToShortFileName>(&self, name: N) -> bool {
158
+ let find_result = self.find_directory_entry(name);
159
+ if find_result.is_ok() {
160
+ return true;
161
+ }
162
+ false
163
164
+
165
/// Call a callback function for each directory entry in a directory.
166
///
167
/// Long File Names will be ignored.
0 commit comments