@@ -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_shared`]: File::lock_shared
@@ -697,6 +700,9 @@ impl File {
697
700
/// and the `LockFileEx` function on Windows. Note that, this
698
701
/// [may change in the future][changes].
699
702
///
703
+ /// On Windows, locking a file will fail if the file is opened only for append. To lock a file,
704
+ /// open it with either `.read(true).append(true)` or `.write(true)`.
705
+ ///
700
706
/// [changes]: io#platform-specific-behavior
701
707
///
702
708
/// [`lock`]: File::lock
@@ -751,6 +757,9 @@ impl File {
751
757
/// and `LOCKFILE_FAIL_IMMEDIATELY` flags. Note that, this
752
758
/// [may change in the future][changes].
753
759
///
760
+ /// On Windows, locking a file will fail if the file is opened only for append. To lock a file,
761
+ /// open it with either `.read(true).append(true)` or `.write(true)`.
762
+ ///
754
763
/// [changes]: io#platform-specific-behavior
755
764
///
756
765
/// [`lock`]: File::lock
@@ -804,6 +813,9 @@ impl File {
804
813
/// `LOCKFILE_FAIL_IMMEDIATELY` flag. Note that, this
805
814
/// [may change in the future][changes].
806
815
///
816
+ /// On Windows, locking a file will fail if the file is opened only for append. To lock a file,
817
+ /// open it with either `.read(true).append(true)` or `.write(true)`.
818
+ ///
807
819
/// [changes]: io#platform-specific-behavior
808
820
///
809
821
/// [`lock`]: File::lock
@@ -845,6 +857,9 @@ impl File {
845
857
/// and the `UnlockFile` function on Windows. Note that, this
846
858
/// [may change in the future][changes].
847
859
///
860
+ /// On Windows, locking a file will fail if the file is opened only for append. To lock a file,
861
+ /// open it with either `.read(true).append(true)` or `.write(true)`.
862
+ ///
848
863
/// [changes]: io#platform-specific-behavior
849
864
///
850
865
/// # Examples
0 commit comments