package ru.yandex.webmaster3.storage.util.yt;

import java.io.Closeable;
import java.io.File;

/**
 * @author aherman
 */
public class YtTableData implements Closeable {
    private final File tableDataFile;

    public YtTableData(File tableDataFile) {
        this.tableDataFile = tableDataFile;
    }

    File getTableDataFile() {
        return tableDataFile;
    }

    public boolean delete() {
        return tableDataFile.delete();
    }

    public long sizeBytes() {
        return tableDataFile.length();
    }

    @Override
    public void close() {
        delete();
    }
}
