⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 filemovedevent.java

📁 一个简易的轮训小程序 哈哈哈哈哈哈后 嘿嘿嘿嘿黑诶
💻 JAVA
字号:
package org.sadun.util.polling;

import java.io.File;

import org.sadun.util.MovedFile;

/**
 * Indicates that the poller has performed an automatic move of a
 * polled file. Can be signalled only if the autoMove move
 * is active (see {@link DirectoryPoller DirectoryPoller class description}).
 *
 * @version 1.0
 * @author C. Sadun
 */
public class FileMovedEvent extends BasePollerEvent {

    private File original;
    private File destination;

    FileMovedEvent(DirectoryPoller poller, File original, File destination) {
        super(poller);
        this.original=original;
        this.destination=destination;
    }
    
    /**
     * Return the original path of the file. Since the file has been moved,
     * this File object does not correspond anymore to a physical file on
     * the filesystem.
     * @return the original path of the file.
     */
    public File getOriginalPath() { return original; }

    /**
     * Return the new path of the file. Since the file has been moved,
     * this File object corresponds to the physical file on
     * the filesystem.
     * @return the new path of the file.
     */
    public File getPath() { return destination; }

    /**
     * Return a {@link MovedFile MovedFile} object encapsulating the
     * move operation.
     * @return a {@link MovedFile MovedFile} object encapsulating the
     *         move operation.
     */
    public MovedFile getMovedFile() {
        return new MovedFile(original, destination, false);
    }

}
    

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -