package com.kryptnostic.kodex.v1.storage;

import java.io.IOException;

public interface DataStore {
    /**
     * Retrieves data previously stored with key, null if there is no data corresponding to this key.
     * 
     * @param dir Directory. Can be null
     * @param file Must not be null
     * @return the data stored at this location, or null if there is none.
     * @throws IOException
     */
    byte[] get( String dir, String file ) throws IOException;

    /**
     * Retrieves data previously stored with key, null if there is no data corresponding to this key.
     * 
     * @param file Must not be null
     * @return the data stored at this location, or null if there is none.
     * @throws IOException
     */
    byte[] get( String file ) throws IOException;

    /**
     * Stores data at the location specified by key.
     * 
     * @param dir Directory. Can be null
     * @param file Must not be null
     * @param value the data to be stored.
     * @throws IOException
     */
    void put( String dir, String file, byte[] value ) throws IOException;

    /**
     * Stores data at the location specified by key.
     * 
     * @param file Must not be null
     * @param value the data to be stored.
     * @throws IOException
     */
    void put( String file, byte[] value ) throws IOException;
}

@@ -1320,11 +1320,125 @@
 ception;
+%0A%0A    /**%0A     * @param file%0A     * @throws IOException%0A     */%0A    void delete( String file ) throws IOException;
 %0A%7D%0A

add delete support to datastore