garydgregory commented on PR #880:
URL: https://github.com/apache/commons-io/pull/880#issuecomment-6402468332

   Hello @dlwhdgus0810 
   
   I am closing this PR in favor of #918 because:
   
   PR #918 differs from the original PR #880 in how it interprets a failed 
initial open.
   
   The original PR switches to reading from the beginning after **any 
`FileNotFoundException`**. That fixes 
[IO-460](https://issues.apache.org/jira/browse/IO-460), but the exception can 
also mean an existing file is temporarily inaccessible. Once access is 
restored, the original change would replay its historical contents despite 
`tailFromEnd=true`.
   
   The revised implementation checks `lastModifiedFileTime()` after the failed 
open:
   
   - `NoSuchFileException` confirms absence, so the eventual read starts at the 
beginning.
   - A successful metadata lookup or another `IOException` leaves the 
configured start mode unchanged.
   
   This is deliberately conservative. Custom `Tailable` implementations must 
report absence through `NoSuchFileException` from their metadata lookup to get 
the new behavior. The Javadoc documents that requirement.
   
   The additional tests cover this distinction, plus appends, reopening, 
missing parent directories, and permission recovery.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to