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