File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -295,6 +295,9 @@ pub fn read_to_string<P: AsRef<Path>>(path: P) -> io::Result<String> {
295295/// This function will create a file if it does not exist,
296296/// and will entirely replace its contents if it does.
297297///
298+ /// Depending on the platform, this function may fail if the
299+ /// full directory path does not exist.
300+ ///
298301/// This is a convenience function for using [`File::create`] and [`write_all`]
299302/// with fewer imports.
300303///
@@ -349,6 +352,9 @@ impl File {
349352 /// This function will create a file if it does not exist,
350353 /// and will truncate it if it does.
351354 ///
355+ /// Depending on the platform, this function may fail if the
356+ /// full directory path does not exist.
357+ ///
352358 /// See the [`OpenOptions::open`] function for more details.
353359 ///
354360 /// # Examples
You can’t perform that action at this time.
0 commit comments