package it.powerbyte.springbootstarter.service;

import it.powerbyte.springbootstarter.entity.FileStorage;
import org.springframework.core.io.Resource;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Path;
import java.util.List;
import java.util.stream.Stream;

public interface FilesStorageService {

    public void init();

    public void save(MultipartFile file);

    public void save(Long ownerId, MultipartFile file);

    public List<FileStorage> findByOwnerId(Long ownerId);
    public Resource load(String filename);

    public void deleteAll();

    public Stream<Path> loadAll();
}

