@@ -408,7 +408,9 @@ impl File {
408
408
///
409
409
/// This function will create a file if it does not exist, or return an error if it does. This
410
410
/// way, if the call succeeds, the file returned is guaranteed to be new.
411
- /// If a file exists at the target location before, creating file will fail with [`AlreadyExists`].
411
+ /// If a file exists at the target location, creating a new file will fail with [`AlreadyExists`]
412
+ /// or another error based on the situation. See [`OpenOptions::open`] for a
413
+ /// non-exhaustive list of likely errors.
412
414
///
413
415
/// This option is useful because it is atomic. Otherwise between checking whether a file
414
416
/// exists and creating a new one, the file may have been created by another process (a TOCTOU
@@ -1074,7 +1076,9 @@ impl OpenOptions {
1074
1076
///
1075
1077
/// No file is allowed to exist at the target location, also no (dangling) symlink. In this
1076
1078
/// way, if the call succeeds, the file returned is guaranteed to be new.
1077
- /// If a file exists at the target location before, creating file will fail with [`AlreadyExists`].
1079
+ /// If a file exists at the target location, creating a new file will fail with [`AlreadyExists`]
1080
+ /// or another error based on the situation. See [`OpenOptions::open`] for a
1081
+ /// non-exhaustive list of likely errors.
1078
1082
///
1079
1083
/// This option is useful because it is atomic. Otherwise between checking
1080
1084
/// whether a file exists and creating a new one, the file may have been
0 commit comments