接口 FileListener
-
public interface FileListenerA File listener. call by provider.
-
-
方法概要
修饰符和类型 方法 说明 default voidonDelete(Path fileOrDir)Called when the listening file/dir deleted.default voidonDirCreate(Path dir)Called when the listening dir created.default voidonFileChange(Path file, long oldSize, long newSize)Called when the listening file modified.default voidonFileCreate(Path file)Called when the listening file created.default voidonSubDirCreate(Path parent, Path dir)Call when the listening dir created a new sub dir.default voidonSubFileCreate(Path parent, Path file)Call when the listening dir created a new sub file.default voidonSubFileDelete(Path parent, Path fileOrDir)Call when the listening dir deleted a file or dir.
-
-
-
方法详细资料
-
onFileCreate
default void onFileCreate(@NotNull Path file) throws IOExceptionCalled when the listening file created.- 参数:
file- The created file.- 抛出:
IOException- IO Exception
-
onDirCreate
default void onDirCreate(@NotNull Path dir) throws IOExceptionCalled when the listening dir created.- 参数:
file- The created dir.- 抛出:
IOException- IO Exception
-
onDelete
default void onDelete(@NotNull Path fileOrDir) throws IOExceptionCalled when the listening file/dir deleted.- 参数:
file- The deleted file/dir.- 抛出:
IOException- IO Exception
-
onFileChange
default void onFileChange(@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 Path parent, @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 Path parent, @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 Path parent, @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
-
-