
using System;
using MindTouch.Dream.Services;

namespace MindTouch.Dream.AmazonS3 {

    /// <summary>
    /// Amazon S3 Client abstraction for use by <see cref="S3StorageService"/>
    /// </summary>
    public interface IAmazonS3Client : IDisposable {
        
        //--- Methods ---

        /// <summary>
        /// Retrieve file or directory information at given path.
        /// </summary>
        /// <param name="path">Path to retrieve.</param>
        /// <param name="head">Perform a HEAD request only.</param>
        /// <returns></returns>
        AmazonS3DataInfo GetDataInfo(string path, bool head);

        /// <summary>
        /// Store a file at a path.
        /// </summary>
        /// <param name="path">Storage path.</param>
        /// <param name="fileInfo">File to store.</param>
        void PutFile(string path, AmazonS3FileHandle fileInfo);

        /// <summary>
        /// Delete a file or directory.
        /// </summary>
        /// <param name="path">Path to delete.</param>
        void Delete(string path);
    }
}