Listen to directory copy event

Hi, 

I need to perform some changes in my plugin whenever a directory is copied and pasted. I am aware that I need to listen to virtual file events. I did that for files and it worked fine but when trying to listen to directory copies I get the files that are included in this directory but not the directory itself.

public void before(@NotNull List<? extends VFileEvent> events) {
    for (VFileEvent event : events) {
        if (event instanceof VFileCopyEvent) {
            VFileCopyEvent copyEvent = (VFileCopyEvent) event;
            System.out.println("File or folder copy : " + copyEvent.getFile().getPath()); // here it just gives that file path but never the folder path
0

请先登录再写评论。