mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-05 01:24:03 +00:00
Document that locking a file fails on Windows if the file is opened only for append
This commit is contained in:
@@ -648,6 +648,9 @@ impl File {
|
||||
/// and the `LockFileEx` function on Windows with the `LOCKFILE_EXCLUSIVE_LOCK` flag. Note that,
|
||||
/// this [may change in the future][changes].
|
||||
///
|
||||
/// On Windows, locking a file will fail if the file is opened only for append. To lock a file,
|
||||
/// open it with either `.read(true).append(true)` or `.write(true)`.
|
||||
///
|
||||
/// [changes]: io#platform-specific-behavior
|
||||
///
|
||||
/// [`lock`]: File::lock
|
||||
@@ -698,6 +701,9 @@ impl File {
|
||||
/// and the `LockFileEx` function on Windows. Note that, this
|
||||
/// [may change in the future][changes].
|
||||
///
|
||||
/// On Windows, locking a file will fail if the file is opened only for append. To lock a file,
|
||||
/// open it with either `.read(true).append(true)` or `.write(true)`.
|
||||
///
|
||||
/// [changes]: io#platform-specific-behavior
|
||||
///
|
||||
/// [`lock`]: File::lock
|
||||
@@ -753,6 +759,9 @@ impl File {
|
||||
/// and `LOCKFILE_FAIL_IMMEDIATELY` flags. Note that, this
|
||||
/// [may change in the future][changes].
|
||||
///
|
||||
/// On Windows, locking a file will fail if the file is opened only for append. To lock a file,
|
||||
/// open it with either `.read(true).append(true)` or `.write(true)`.
|
||||
///
|
||||
/// [changes]: io#platform-specific-behavior
|
||||
///
|
||||
/// [`lock`]: File::lock
|
||||
@@ -807,6 +816,9 @@ impl File {
|
||||
/// `LOCKFILE_FAIL_IMMEDIATELY` flag. Note that, this
|
||||
/// [may change in the future][changes].
|
||||
///
|
||||
/// On Windows, locking a file will fail if the file is opened only for append. To lock a file,
|
||||
/// open it with either `.read(true).append(true)` or `.write(true)`.
|
||||
///
|
||||
/// [changes]: io#platform-specific-behavior
|
||||
///
|
||||
/// [`lock`]: File::lock
|
||||
@@ -849,6 +861,9 @@ impl File {
|
||||
/// and the `UnlockFile` function on Windows. Note that, this
|
||||
/// [may change in the future][changes].
|
||||
///
|
||||
/// On Windows, locking a file will fail if the file is opened only for append. To lock a file,
|
||||
/// open it with either `.read(true).append(true)` or `.write(true)`.
|
||||
///
|
||||
/// [changes]: io#platform-specific-behavior
|
||||
///
|
||||
/// # Examples
|
||||
|
||||
Reference in New Issue
Block a user