<div dir="ltr"><div>Hi All,</div><div><br></div><div>Currently, the following snippet will not succeed on Windows</div><div>try (RandomAccessFile ignored = new RandomAccessFile(f, "r")) {<br>    f.delete();</div><div>}</div><div>because RandomAccessFile is opened without the FILE_SHARE_DELETE option for the CreateFileW() call.</div><div>I wonder if this is intentional and what, if anything, would break if this decision is reversed and FILE_SHARE_DELETE is supplied? I suspect applications rely on the existing semantics but can't give concrete examples myself.</div><div><br></div><div>Appreciate your input.</div><div><br></div><div>Maxim.</div></div>