package ru.ldeloff.hedgehogcloud.service;

import org.springframework.stereotype.Service;

import java.io.File;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

@Service
public class FileServiceImpl implements FileService {
    @Override
    public List<File> list(String path) {
        return Stream.of(new File(path).listFiles()).collect(Collectors.toList());
    }
}
