class FileSystemUtils {

    static FolderEntry toFolderEntry(Path pathFile) {
        FolderEntry folderEntry;
        try (InputStream inputStream = Files.newInputStream(pathFile)) {
            Properties properties = new Properties();
            properties.load(inputStream);
            folderEntry = new FolderEntry();
            folderEntry.setFolderId(properties.getProperty(FOLDER_ID));
            folderEntry.setContentType(FolderContentType.fromName(properties.getProperty(CONTENT_TYPE)));
            folderEntry.setContentId(properties.getProperty(CONTENT_ID));
        } catch (IOException e) {
            throw new TDPException(UNABLE_TO_READ_FOLDER_ENTRY, e, build().put("path", pathFile));
        }
        return folderEntry;
    }

    private  FileSystemUtils();

}