001/*
002 * To change this template, choose Tools | Templates
003 * and open the template in the editor.
004 */
005package org.anarres.qemu.exec.host.disk;
006
007import java.io.File;
008import javax.annotation.Nonnull;
009import org.anarres.qemu.image.QEmuImage;
010
011/**
012 *
013 * @author shevek
014 */
015public class FileDisk extends AbstractDisk {
016
017    private final File file;
018
019    public FileDisk(@Nonnull File file) {
020        this.file = file;
021    }
022
023    public FileDisk(@Nonnull String path) {
024        this(new File(path));
025    }
026
027    public FileDisk(@Nonnull QEmuImage image) {
028        this(image.getFile());
029    }
030
031    @Nonnull
032    public File getFile() {
033        return file;
034    }
035
036    @Override
037    public String toString() {
038        return file.getAbsolutePath();
039    }
040}