/*
 * @author Ranides Atterwim <ranides@gmail.com>
 * @copyright Ranides Atterwim
 * @license WTFPL
 * @url http://ranides.net/projects/assira
 */
package net.ranides.assira.io.uri;

import java.io.File;
import java.io.IOException;
import java.net.URI;
import java.time.Instant;

/**
 *
 * @author Ranides Atterwim <ranides@gmail.com>
 */
public enum URITime {
    
    CREATED, 
    MODIFIED,
    ACCESSED,
    META_MODIFIED,
    ;
    
    public Instant resolve(URIHandle ustream) throws IOException {
        return ustream.time(this);
    }
    
    public Instant resolve(File file) throws IOException {
        return resolve(URIHandle.resolve(file));
    }
    
    public Instant resolve(URI uri) throws IOException {
        return resolve(URIHandle.resolve(uri));
    }
    
}
