-
public interface FileListenerA File listener. call by provider.
-
-
方法概要
修饰符和类型 方法 说明 default voidonDelete(@NotNull Path fileOrDir)Called when the listening file/dir deleted.default voidonDirCreate(@NotNull Path dir)Called when the listening dir created.default voidonFileChange(@NotNull Path file, long oldSize, long newSize)Called when the listening file modified.default voidonFileCreate(@NotNull Path file)Called when the listening file created.default voidonSubDirCreate(@NotNull Path parent, @NotNull Path dir)Call when the listening dir created a new sub dir.default voidonSubFileCreate(@NotNull Path parent, @NotNull Path file)Call when the listening dir created a new sub file.default voidonSubFileDelete(@NotNull Path parent, @NotNull Path fileOrDir)Call when the listening dir deleted a file or dir.
-
-
-
方法详细资料
-
onFileCreate
default void onFileCreate(@NotNull @NotNull Path file) throws IOExceptionCalled when the listening file created.- 参数:
file- The created file.- 抛出:
IOException- IO Exception
-
onDirCreate
default void onDirCreate(@NotNull @NotNull Path dir) throws IOExceptionCalled when the listening dir created.- 参数:
file- The created dir.- 抛出:
IOException- IO Exception
-
onDelete
default void onDelete(@NotNull @NotNull Path fileOrDir) throws IOExceptionCalled when the listening file/dir deleted.- 参数:
file- The deleted file/dir.- 抛出:
IOException- IO Exception
-
onFileChange
default void onFileChange(@NotNull @NotNull Path file, long oldSize, long newSize) throws IOExceptionCalled when the listening file modified.- 参数:
file- The modified file.newSize- The current file sizeoldSize- before changed's size- 抛出:
IOException- IO Exception
-
onSubFileCreate
default void onSubFileCreate(@NotNull @NotNull Path parent, @NotNull @NotNull Path file) throws IOExceptionCall when the listening dir created a new sub file.- 参数:
parent- The listening dirfile- The created sub file- 抛出:
IOException- IO Exception
-
onSubDirCreate
default void onSubDirCreate(@NotNull @NotNull Path parent, @NotNull @NotNull Path dir) throws IOExceptionCall when the listening dir created a new sub dir.- 参数:
parent- The listening dirfile- The created sub dir- 抛出:
IOException- IO Exception
-
onSubFileDelete
default void onSubFileDelete(@NotNull @NotNull Path parent, @NotNull @NotNull Path fileOrDir) throws IOExceptionCall when the listening dir deleted a file or dir.- 参数:
parent- The listening dirfile- The deleted sub file/dir.- 抛出:
IOException- IO Exception
-
-