All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.libtorrent4j.alerts.FileRenameFailedAlert Maven / Gradle / Ivy

The newest version!
package org.libtorrent4j.alerts;

import org.libtorrent4j.ErrorCode;
import org.libtorrent4j.swig.file_rename_failed_alert;

/**
 * This is posted as a response to a torrent_handle::rename_file() call, if the rename
 * operation failed.
 *
 * @author gubatron
 * @author aldenml
 */
public final class FileRenameFailedAlert extends TorrentAlert {

    public FileRenameFailedAlert(file_rename_failed_alert alert) {
        super(alert);
    }

    /**
     * refers to the index of the file that was supposed to be renamed.
     *
     *
     */
    public int getIndex() {
        return alert.getIndex();
    }

    /**
     * is the error code returned from the filesystem.
     *
     *
     */
    public ErrorCode getError() {
        return new ErrorCode(alert.getError());
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy