Java: File Rename detection
•
Java
Is there any way to use java to detect file renaming? (NiO's watchservice API or any other)
Solution
Take a look at jpathwatch In addition to the standard monitoring event types specified in Java 7 (entry_create, entry_delete, entry_modify), it also has some named entry_ RENAME_ From and entry_ RENAME_ To events that are triggered when a file is renamed Note that this depends on whether the underlying operating system supports file rename events
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码