using System;
using System.Threading.Tasks;
using Abp.Domain.Services;

namespace YGNT.File.Core.Domain
{
    public interface IFileManager : IDomainService
    {
        /// <summary>
        /// 检测文件md5 是否已经存在
        /// </summary>
        /// <param name="md5"></param>
        /// <returns></returns>
        Task<Guid?> VerifyMd5Async(string md5);

        /// <summary>
        /// 录入文件
        /// </summary>
        /// <param name="filePath"></param>
        /// <returns></returns>
        Task<File> CreateAsync(string filePath);

        /// <summary>
        /// 录入文件
        /// </summary>
        /// <param name="filePath"></param>
        /// <param name="fileName"></param>
        /// <returns></returns>
        File Create(string filePath, string fileName = null);
    }
}