@@ -648,6 +648,9 @@ impl File {
648
648
/// and the `LockFileEx` function on Windows with the `LOCKFILE_EXCLUSIVE_LOCK` flag. Note that,
649
649
/// this [may change in the future][changes].
650
650
///
651
+ /// On Windows, locking a file will fail if the file is opened only for append. To lock a file,
652
+ /// open it with either `.read(true).append(true)` or `.write(true)`.
653
+ ///
651
654
/// [changes]: io#platform-specific-behavior
652
655
///
653
656
/// [`lock`]: File::lock
@@ -698,6 +701,9 @@ impl File {
698
701
/// and the `LockFileEx` function on Windows. Note that, this
699
702
/// [may change in the future][changes].
700
703
///
704
+ /// On Windows, locking a file will fail if the file is opened only for append. To lock a file,
705
+ /// open it with either `.read(true).append(true)` or `.write(true)`.
706
+ ///
701
707
/// [changes]: io#platform-specific-behavior
702
708
///
703
709
/// [`lock`]: File::lock
@@ -753,6 +759,9 @@ impl File {
753
759
/// and `LOCKFILE_FAIL_IMMEDIATELY` flags. Note that, this
754
760
/// [may change in the future][changes].
755
761
///
762
+ /// On Windows, locking a file will fail if the file is opened only for append. To lock a file,
763
+ /// open it with either `.read(true).append(true)` or `.write(true)`.
764
+ ///
756
765
/// [changes]: io#platform-specific-behavior
757
766
///
758
767
/// [`lock`]: File::lock
@@ -807,6 +816,9 @@ impl File {
807
816
/// `LOCKFILE_FAIL_IMMEDIATELY` flag. Note that, this
808
817
/// [may change in the future][changes].
809
818
///
819
+ /// On Windows, locking a file will fail if the file is opened only for append. To lock a file,
820
+ /// open it with either `.read(true).append(true)` or `.write(true)`.
821
+ ///
810
822
/// [changes]: io#platform-specific-behavior
811
823
///
812
824
/// [`lock`]: File::lock
@@ -849,6 +861,9 @@ impl File {
849
861
/// and the `UnlockFile` function on Windows. Note that, this
850
862
/// [may change in the future][changes].
851
863
///
864
+ /// On Windows, locking a file will fail if the file is opened only for append. To lock a file,
865
+ /// open it with either `.read(true).append(true)` or `.write(true)`.
866
+ ///
852
867
/// [changes]: io#platform-specific-behavior
853
868
///
854
869
/// # Examples
0 commit comments